Package org.ametys.plugins.repository
Interface AmetysObjectIterable<A extends AmetysObject>
- Type Parameters:
A- the actual type ofAmetysObjects.
- All Superinterfaces:
AutoCloseable,Closeable,Iterable<A>
- All Known Implementing Classes:
ChainedAmetysObjectIterable,CollatingUniqueAmetysObjectIterable,CollectionIterable,EmptyIterable,IdCollectionIterable,NodeIteratorIterable,UniqueChainedAmetysObjectIterable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the associated resources.
AnAmetysObjectIterablemust NOT be closed if any of the containedAmetysObjectis still in use.longgetSize()Returns the number of elements in this iterable.iterator()default Spliterator<A> stream()Returns a sequentialStreamwith this iterable as its source.
-
Method Details
-
getSize
long getSize()Returns the number of elements in this iterable. If this information is unavailable, returns -1.- Returns:
- a long
-
iterator
- Specified by:
iteratorin interfaceIterable<A extends AmetysObject>
-
close
void close()Close the associated resources.
AnAmetysObjectIterablemust NOT be closed if any of the containedAmetysObjectis still in use.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
stream
Returns a sequentialStreamwith this iterable as its source.- Returns:
- a sequential
Streamover the objects in this iterable.
-
spliterator
- Specified by:
spliteratorin interfaceIterable<A extends AmetysObject>
-