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
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 void
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.AmetysObjectIterator<A>
iterator()
default Spliterator<A>
spliterator()
default Stream<A>
stream()
Returns a sequentialStream
with 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:
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
default Stream<A> stream()
Returns a sequentialStream
with this iterable as its source.- Returns:
- a sequential
Stream
over the objects in this iterable.
-
spliterator
default Spliterator<A> spliterator()
- Specified by:
spliterator
in interfaceIterable<A extends AmetysObject>
-
-