Class AbstractLinkedMap.LinkIterator<K,V>
java.lang.Object
org.apache.commons.collections4.map.AbstractLinkedMap.LinkIterator<K,V>
- Type Parameters:
K
- the key type.V
- the value type.
- Direct Known Subclasses:
AbstractLinkedMap.EntrySetIterator
,AbstractLinkedMap.KeySetIterator
,AbstractLinkedMap.LinkMapIterator
,AbstractLinkedMap.ValuesIterator
- Enclosing class:
AbstractLinkedMap<K,
V>
Base Iterator that iterates in link order.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
The modification count expectedprotected AbstractLinkedMap.LinkEntry
<K, V> The current (last returned) entryprotected AbstractLinkedMap.LinkEntry
<K, V> The next entryprotected final AbstractLinkedMap
<K, V> The parent map -
Constructor Summary
ModifierConstructorDescriptionprotected
LinkIterator
(AbstractLinkedMap<K, V> parent) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractLinkedMap.LinkEntry
<K, V> Gets the current entry.boolean
hasNext()
Tests whether there is another entry.boolean
Tests whether there is a previous entry.protected AbstractLinkedMap.LinkEntry
<K, V> Gets the next entry.protected AbstractLinkedMap.LinkEntry
<K, V> Gets the previous entry.void
remove()
Removes the current entry.void
reset()
Resets the state to the end.toString()
-
Field Details
-
parent
The parent map -
last
The current (last returned) entry -
next
The next entry -
expectedModCount
The modification count expected
-
-
Constructor Details
-
LinkIterator
Constructs a new instance.- Parameters:
parent
- The parent AbstractLinkedMap.
-
-
Method Details
-
currentEntry
Gets the current entry.- Returns:
- the current entry.
-
hasNext
Tests whether there is another entry.- Returns:
- whether there is another entry.
-
hasPrevious
Tests whether there is a previous entry.- Returns:
- whether there is a previous entry.
-
nextEntry
Gets the next entry.- Returns:
- the next entry.
-
previousEntry
Gets the previous entry.- Returns:
- the previous entry.
-
remove
Removes the current entry. -
reset
Resets the state to the end. -
toString
-