Class IndexingIterator<In>
- java.lang.Object
-
- com.identityworksllc.iiq.common.iterators.IndexingIterator<In>
-
-
Constructor Summary
Constructors Constructor Description IndexingIterator(Iterator<? extends In> input)
Wrapper constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Index<In>
next()
void
remove()
Removes the current item from the list and decrements the index.-
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
-
-
-
-
Constructor Detail
-
IndexingIterator
public IndexingIterator(Iterator<? extends In> input)
Wrapper constructor- Parameters:
input
- The input iterator
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<In>
- See Also:
Iterator.hasNext()
-
remove
public void remove()
Removes the current item from the list and decrements the index.The next item returned will have the same index as the previous one. If the wrapped iterator does not support removals, this method will throw an appropriate exception without decrementing the counter.
-
-