Class AbstractLinkedMap.LinkIterator
java.lang.Object
org.apache.commons.collections.map.AbstractLinkedMap.LinkIterator
- All Implemented Interfaces:
Iterator,OrderedIterator,ResettableIterator
- Direct Known Subclasses:
AbstractLinkedMap.EntrySetIterator,AbstractLinkedMap.LinkMapIterator,AbstractLinkedMap.ValuesIterator
- Enclosing class:
- AbstractLinkedMap
protected abstract static class AbstractLinkedMap.LinkIterator
extends Object
implements OrderedIterator, ResettableIterator
Base Iterator that iterates in link order.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe modification count expectedprotected AbstractLinkedMap.LinkEntryThe current (last returned) entryprotected AbstractLinkedMap.LinkEntryThe next entryprotected final AbstractLinkedMapThe parent map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractLinkedMap.LinkEntrybooleanhasNext()booleanChecks to see if there is a previous element that can be iterated to.protected AbstractLinkedMap.LinkEntryprotected AbstractLinkedMap.LinkEntryvoidremove()voidreset()Resets the iterator back to the position at which the iterator was created.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, nextMethods inherited from interface org.apache.commons.collections.OrderedIterator
previous
-
Field Details
-
parent
The parent map -
last
The current (last returned) entry -
next
The next entry -
expectedModCount
protected int expectedModCountThe modification count expected
-
-
Constructor Details
-
LinkIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
hasPrevious
public boolean hasPrevious()Description copied from interface:OrderedIteratorChecks to see if there is a previous element that can be iterated to.- Specified by:
hasPreviousin interfaceOrderedIterator- Returns:
trueif the iterator has a previous element
-
nextEntry
-
previousEntry
-
currentEntry
-
remove
public void remove() -
reset
public void reset()Description copied from interface:ResettableIteratorResets the iterator back to the position at which the iterator was created.- Specified by:
resetin interfaceResettableIterator
-
toString
-