Class MultiResettableIterator<E>
java.lang.Object
org.apache.activemq.artemis.utils.collections.MultiResettableIterator<E>
- Type Parameters:
E- type of the class of the iterator.
- All Implemented Interfaces:
Iterator<E>,ResettableIterator<E>
Extends MultiIterator, adding the ability if the underlying iterators are resettable, then its self can reset. It
achieves this by going back to the first iterator, and as moves to another iterator it resets it.
-
Constructor Details
-
MultiResettableIterator
-
-
Method Details
-
moveTo
protected void moveTo(int index) -
reset
public void reset()Description copied from interface:ResettableIteratorResets the iterator so that you can iterate over all elements from your current position. Your current position (when reached again) signals the end of iteration as if the collection is circular.- Specified by:
resetin interfaceResettableIterator<E>
-
hasNext
public boolean hasNext() -
next
-
get
-