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<?>>
-
Method Summary
Modifier and TypeMethodDescriptionappend
(RepositoryComposition.RepositoryFragments fragments) Create newRepositoryComposition.RepositoryFragments
from the current content appendingRepositoryComposition.RepositoryFragments
.append
(RepositoryFragment<?> fragment) Create newRepositoryComposition.RepositoryFragments
from the current content appendingRepositoryFragment
.empty()
Create emptyRepositoryComposition.RepositoryFragments
.boolean
from
(Collection<RepositoryFragment<?>> fragments) int
hashCode()
@Nullable Object
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isEmpty()
Returns whether the currentStreamable
is empty.iterator()
CreateRepositoryComposition.RepositoryFragments
from just implementation objects.methods()
of
(RepositoryFragment<?>... fragments) CreateRepositoryComposition.RepositoryFragments
fromfragments
.int
size()
Returns the number offragments
available.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
empty
Create emptyRepositoryComposition.RepositoryFragments
.- Returns:
- empty
RepositoryComposition.RepositoryFragments
.
-
just
CreateRepositoryComposition.RepositoryFragments
from just implementation objects.- Parameters:
implementations
- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragments
forimplementations
.
-
of
CreateRepositoryComposition.RepositoryFragments
fromfragments
.- Parameters:
fragments
- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragments
forimplementations
.
-
from
public static RepositoryComposition.RepositoryFragments from(Collection<RepositoryFragment<?>> fragments) - Parameters:
fragments
- must not be null.- Returns:
- the
RepositoryComposition.RepositoryFragments
forimplementations
.
-
isEmpty
public boolean isEmpty()Description copied from interface:Streamable
Returns whether the currentStreamable
is empty.- Specified by:
isEmpty
in interfaceStreamable<RepositoryFragment<?>>
- Returns:
-
append
@Contract("_ -> new") @CheckReturnValue public RepositoryComposition.RepositoryFragments append(RepositoryFragment<?> fragment) Create newRepositoryComposition.RepositoryFragments
from the current content appendingRepositoryFragment
.- Parameters:
fragment
- must not be null- Returns:
- the new
RepositoryComposition.RepositoryFragments
containing all existing fragments and the givenRepositoryFragment
as last element.
-
append
@Contract("_ -> new") @CheckReturnValue public RepositoryComposition.RepositoryFragments append(RepositoryComposition.RepositoryFragments fragments) Create newRepositoryComposition.RepositoryFragments
from the current content appendingRepositoryComposition.RepositoryFragments
.- Parameters:
fragments
- must not be null- Returns:
- the new
RepositoryComposition.RepositoryFragments
containing all existing fragments and the givenRepositoryComposition.RepositoryFragments
as last elements.
-
iterator
- Specified by:
iterator
in 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.InvokeMethod
by resolving the fragment that implements a suitable method.- Throws:
Throwable
-
size
public int size()Returns the number offragments
available.- Returns:
- the number of
fragments
. - Since:
- 2.5
-
toString
-
equals
-
hashCode
public int hashCode()
-