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.- 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(List<RepositoryFragment<?>> fragments) inthashCode()InvokeMethodby resolving the fragment that implements a suitable method.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
- Parameters:
fragments- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragmentsforimplementations.
-
append
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
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
@Nullable public Object invoke(Method invokedMethod, Method methodToCall, Object[] args) throws Throwable InvokeMethodby resolving the fragment that implements a suitable method.- Parameters:
invokedMethod- invoked method as per invocation on the interface.methodToCall- backend method that is backing the call.- Returns:
- Throws:
Throwable
-
size
public int size()Returns the number offragmentsavailable.- Returns:
- the number of
fragments. - Since:
- 2.5
-
toString
-
equals
-
hashCode
public int hashCode()
-