/** * Create new {@link RepositoryFragments} from the current content appending {@link RepositoryFragment}. * * @param fragment must not be {@literal null} * @return the new {@link RepositoryFragments} containing all existing fragments and the given * {@link RepositoryFragment} as last element. */ public RepositoryFragments append(RepositoryFragment<?> fragment) { Assert.notNull(fragment, "RepositoryFragment must not be null!"); return concat(stream(), Stream.of(fragment)); }
/** * Create new {@link RepositoryFragments} from the current content appending {@link RepositoryFragments}. * * @param fragments must not be {@literal null} * @return the new {@link RepositoryFragments} containing all existing fragments and the given * {@link RepositoryFragments} as last elements. */ public RepositoryFragments append(RepositoryFragments fragments) { Assert.notNull(fragments, "RepositoryFragments must not be null!"); return concat(stream(), fragments.stream()); }