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,ExportCatalogByLevelsGenerator.FilteredByVersionLabelIterable,IdCollectionIterable,NodeIteratorIterable,StaticZone.StaticZoneItemIterable,UniqueChainedAmetysObjectIterable
public interface AmetysObjectIterable<A extends AmetysObject> extends Iterable<A>, Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()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.AmetysObjectIterator<A>iterator()default Spliterator<A>spliterator()default Stream<A>stream()Returns a sequentialStreamwith this iterable as its source.
-
-
-
Method Detail
-
getSize
long getSize()
Returns the number of elements in this iterable. If this information is unavailable, returns -1.- Returns:
- a long
-
iterator
AmetysObjectIterator<A> 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
default Stream<A> stream()
Returns a sequentialStreamwith this iterable as its source.- Returns:
- a sequential
Streamover the objects in this iterable.
-
spliterator
default Spliterator<A> spliterator()
- Specified by:
spliteratorin interfaceIterable<A extends AmetysObject>
-
-