Package org.ametys.plugins.repository
Interface AmetysObjectIterable<A extends AmetysObject>
- Type Parameters:
A
- the actual type ofAmetysObject
s.
- All Superinterfaces:
AutoCloseable
,Closeable
,Iterable<A>
- All Known Implementing Classes:
ChainedAmetysObjectIterable
,CollatingUniqueAmetysObjectIterable
,CollectionIterable
,EmptyIterable
,IdCollectionIterable
,NodeIteratorIterable
,StaticZone.StaticZoneItemIterable
,UniqueChainedAmetysObjectIterable
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the associated resources.
AnAmetysObjectIterable
must NOT be closed if any of the containedAmetysObject
is still in use.long
getSize()
Returns the number of elements in this iterable.iterator()
default Spliterator<A>
stream()
Returns a sequentialStream
with 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:
iterator
in interfaceIterable<A extends AmetysObject>
-
close
void close()Close the associated resources.
AnAmetysObjectIterable
must NOT be closed if any of the containedAmetysObject
is still in use.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
stream
Returns a sequentialStream
with this iterable as its source.- Returns:
- a sequential
Stream
over the objects in this iterable.
-
spliterator
- Specified by:
spliterator
in interfaceIterable<A extends AmetysObject>
-