Package org.ametys.plugins.repository
Class IdCollectionIterable.IdIterator
- java.lang.Object
-
- org.ametys.plugins.repository.IdCollectionIterable.IdIterator
-
- All Implemented Interfaces:
Iterator<A>,AmetysObjectIterator<A>
- Enclosing class:
- IdCollectionIterable<A extends AmetysObject>
class IdCollectionIterable.IdIterator extends Object implements AmetysObjectIterator<A>
-
-
Constructor Summary
Constructors Constructor Description IdIterator(Iterator<String> it, long size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetPosition()Returns the current position within the iterator.longgetSize()Returns the number of elements in the iterator.booleanhasNext()Anext()voidremove()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObjectIterator
skip
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
IdIterator
public IdIterator(Iterator<String> it, long size)
-
-
Method Detail
-
getSize
public long getSize()
Description copied from interface:AmetysObjectIteratorReturns the number of elements in the iterator. If this information is unavailable, returns -1.- Specified by:
getSizein interfaceAmetysObjectIterator<A extends AmetysObject>- Returns:
- a long
-
getPosition
public long getPosition()
Description copied from interface:AmetysObjectIteratorReturns the current position within the iterator. The number returned is the 0-based index of the next element in the iterator, i.e. the one that will be returned on the subsequentnextcall.
Note that this method does not check if there is a next element, i.e. an empty iterator will always return 0.- Specified by:
getPositionin interfaceAmetysObjectIterator<A extends AmetysObject>- Returns:
- a long
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<A extends AmetysObject>
-
remove
public void remove()
- Specified by:
removein interfaceIterator<A extends AmetysObject>
-
-