Class StaticZone.StaticZoneItemIterator
- java.lang.Object
-
- org.ametys.plugins.blog.repository.StaticZone.StaticZoneItemIterator
-
- All Implemented Interfaces:
Iterator<StaticZoneItem>,AmetysObjectIterator<StaticZoneItem>
- Enclosing class:
- StaticZone
class StaticZone.StaticZoneItemIterator extends Object implements AmetysObjectIterator<StaticZoneItem>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) AmetysObjectIterator<? extends ZoneItem>_it
-
Constructor Summary
Constructors Constructor Description StaticZoneItemIterator(AmetysObjectIterator<? extends ZoneItem> it)
-
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()StaticZoneItemnext()voidremove()voidskip(long skipNum)Skip a number of elements in the iterator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
_it
AmetysObjectIterator<? extends ZoneItem> _it
-
-
Constructor Detail
-
StaticZoneItemIterator
public StaticZoneItemIterator(AmetysObjectIterator<? extends ZoneItem> it)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<StaticZoneItem>
-
next
public StaticZoneItem next()
- Specified by:
nextin interfaceIterator<StaticZoneItem>
-
skip
public void skip(long skipNum)
Description copied from interface:AmetysObjectIteratorSkip a number of elements in the iterator.
The default implementation simply callsskipNumtimesIterator.next().- Specified by:
skipin interfaceAmetysObjectIterator<StaticZoneItem>- Parameters:
skipNum- the non-negative number of elements to skip
-
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<StaticZoneItem>- Returns:
- a long
-
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<StaticZoneItem>- Returns:
- a long
-
remove
public void remove()
- Specified by:
removein interfaceIterator<StaticZoneItem>
-
-