Class AbstractLinkedMap.LinkIterator
- java.lang.Object
-
- org.apache.commons.collections.map.AbstractLinkedMap.LinkIterator
-
- All Implemented Interfaces:
java.util.Iterator,OrderedIterator,ResettableIterator
- Direct Known Subclasses:
AbstractLinkedMap.EntrySetIterator,AbstractLinkedMap.LinkMapIterator,AbstractLinkedMap.ValuesIterator
- Enclosing class:
- AbstractLinkedMap
protected abstract static class AbstractLinkedMap.LinkIterator extends java.lang.Object implements OrderedIterator, ResettableIterator
Base Iterator that iterates in link order.
-
-
Field Summary
Fields Modifier and Type Field Description protected intexpectedModCountThe modification count expectedprotected AbstractLinkedMap.LinkEntrylastThe current (last returned) entryprotected AbstractLinkedMap.LinkEntrynextThe next entryprotected AbstractLinkedMapparentThe parent map
-
Constructor Summary
Constructors Modifier Constructor Description protectedLinkIterator(AbstractLinkedMap parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractLinkedMap.LinkEntrycurrentEntry()booleanhasNext()booleanhasPrevious()Checks to see if there is a previous element that can be iterated to.protected AbstractLinkedMap.LinkEntrynextEntry()protected AbstractLinkedMap.LinkEntrypreviousEntry()voidremove()voidreset()Resets the iterator back to the position at which the iterator was created.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.collections.OrderedIterator
previous
-
-
-
-
Field Detail
-
parent
protected final AbstractLinkedMap parent
The parent map
-
last
protected AbstractLinkedMap.LinkEntry last
The current (last returned) entry
-
next
protected AbstractLinkedMap.LinkEntry next
The next entry
-
expectedModCount
protected int expectedModCount
The modification count expected
-
-
Constructor Detail
-
LinkIterator
protected LinkIterator(AbstractLinkedMap parent)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator
-
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
protected AbstractLinkedMap.LinkEntry nextEntry()
-
previousEntry
protected AbstractLinkedMap.LinkEntry previousEntry()
-
currentEntry
protected AbstractLinkedMap.LinkEntry currentEntry()
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator
-
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-