Class RepositoryComposition.RepositoryFragments
java.lang.Object
org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments
- All Implemented Interfaces:
Iterable<RepositoryFragment<?>>,Supplier<Stream<RepositoryFragment<?>>>,Streamable<RepositoryFragment<?>>
- Enclosing class:
RepositoryComposition
public static class RepositoryComposition.RepositoryFragments
extends Object
implements Streamable<RepositoryFragment<?>>
Value object representing an ordered list of
fragments.- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionappend(RepositoryComposition.RepositoryFragments fragments) Create newRepositoryComposition.RepositoryFragmentsfrom the current content appendingRepositoryComposition.RepositoryFragments.append(RepositoryFragment<?> fragment) Create newRepositoryComposition.RepositoryFragmentsfrom the current content appendingRepositoryFragment.empty()Create emptyRepositoryComposition.RepositoryFragments.booleanfrom(Collection<RepositoryFragment<?>> fragments) inthashCode()@Nullable ObjectDeprecated, for removal: This API element is subject to removal in a future version.booleanisEmpty()Returns whether the currentStreamableis empty.iterator()CreateRepositoryComposition.RepositoryFragmentsfrom just implementation objects.methods()of(RepositoryFragment<?>... fragments) CreateRepositoryComposition.RepositoryFragmentsfromfragments.intsize()Returns the number offragmentsavailable.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
empty
Create emptyRepositoryComposition.RepositoryFragments.- Returns:
- empty
RepositoryComposition.RepositoryFragments.
-
just
CreateRepositoryComposition.RepositoryFragmentsfrom just implementation objects.- Parameters:
implementations- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragmentsforimplementations.
-
of
CreateRepositoryComposition.RepositoryFragmentsfromfragments.- Parameters:
fragments- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragmentsforimplementations.
-
from
public static RepositoryComposition.RepositoryFragments from(Collection<RepositoryFragment<?>> fragments) - Parameters:
fragments- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragmentsforimplementations.
-
isEmpty
public boolean isEmpty()Description copied from interface:StreamableReturns whether the currentStreamableis empty.- Specified by:
isEmptyin interfaceStreamable<RepositoryFragment<?>>- Returns:
-
append
@Contract("_ -> new") @CheckReturnValue public RepositoryComposition.RepositoryFragments append(RepositoryFragment<?> fragment) Create newRepositoryComposition.RepositoryFragmentsfrom the current content appendingRepositoryFragment.- Parameters:
fragment- must not be null- Returns:
- the new
RepositoryComposition.RepositoryFragmentscontaining all existing fragments and the givenRepositoryFragmentas last element.
-
append
@Contract("_ -> new") @CheckReturnValue public RepositoryComposition.RepositoryFragments append(RepositoryComposition.RepositoryFragments fragments) Create newRepositoryComposition.RepositoryFragmentsfrom the current content appendingRepositoryComposition.RepositoryFragments.- Parameters:
fragments- must not be null- Returns:
- the new
RepositoryComposition.RepositoryFragmentscontaining all existing fragments and the givenRepositoryComposition.RepositoryFragmentsas last elements.
-
iterator
- Specified by:
iteratorin interfaceIterable<RepositoryFragment<?>>
-
methods
-
invoke
@Deprecated(forRemoval=true) public @Nullable Object invoke(Method invokedMethod, Method methodToCall, Object[] args) throws Throwable Deprecated, for removal: This API element is subject to removal in a future version.InvokeMethodby resolving the fragment that implements a suitable method.- Throws:
Throwable
-
size
-
toString
-
equals
-
hashCode
-