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 int
The modification count expectedprotected AbstractLinkedMap.LinkEntry
The current (last returned) entryprotected AbstractLinkedMap.LinkEntry
The next entryprotected final AbstractLinkedMap
The parent map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractLinkedMap.LinkEntry
boolean
hasNext()
boolean
Checks to see if there is a previous element that can be iterated to.protected AbstractLinkedMap.LinkEntry
protected AbstractLinkedMap.LinkEntry
void
remove()
void
reset()
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, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, next
Methods 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:OrderedIterator
Checks to see if there is a previous element that can be iterated to.- Specified by:
hasPrevious
in interfaceOrderedIterator
- Returns:
true
if the iterator has a previous element
-
nextEntry
-
previousEntry
-
currentEntry
-
remove
public void remove() -
reset
public void reset()Description copied from interface:ResettableIterator
Resets the iterator back to the position at which the iterator was created.- Specified by:
reset
in interfaceResettableIterator
-
toString
-