private class AbstractPatriciaTrie.TrieMapIterator extends AbstractPatriciaTrie.TrieIterator<K> implements OrderedMapIterator<K,V>
OrderedMapIterator
for a Trie
.Modifier and Type | Field and Description |
---|---|
protected AbstractPatriciaTrie.TrieEntry<K,V> |
previous |
current, expectedModCount, next
Modifier | Constructor and Description |
---|---|
private |
TrieMapIterator() |
Modifier and Type | Method and Description |
---|---|
K |
getKey()
Gets the current key, which is the key returned by the last call
to
next() . |
V |
getValue()
Gets the current value, which is the value associated with the last key
returned by
next() . |
boolean |
hasPrevious()
Checks to see if there is a previous entry that can be iterated to.
|
K |
next()
Gets the next key from the
Map . |
protected AbstractPatriciaTrie.TrieEntry<K,V> |
nextEntry()
Returns the next
AbstractPatriciaTrie.TrieEntry . |
K |
previous()
Gets the previous key from the
Map . |
protected AbstractPatriciaTrie.TrieEntry<K,V> |
previousEntry() |
V |
setValue(V value)
Sets the value associated with the current key (optional operation).
|
findNext, hasNext, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasNext, remove
protected AbstractPatriciaTrie.TrieEntry<K,V> previous
public K next()
MapIterator
Map
.next
in interface java.util.Iterator<K>
next
in interface MapIterator<K,V>
public K getKey()
MapIterator
next()
.getKey
in interface MapIterator<K,V>
public V getValue()
MapIterator
next()
.getValue
in interface MapIterator<K,V>
public V setValue(V value)
MapIterator
setValue
in interface MapIterator<K,V>
value
- the new valuepublic boolean hasPrevious()
OrderedMapIterator
hasPrevious
in interface OrderedIterator<K>
hasPrevious
in interface OrderedMapIterator<K,V>
true
if the iterator has a previous elementpublic K previous()
OrderedMapIterator
Map
.previous
in interface OrderedIterator<K>
previous
in interface OrderedMapIterator<K,V>
protected AbstractPatriciaTrie.TrieEntry<K,V> nextEntry()
AbstractPatriciaTrie.TrieIterator
AbstractPatriciaTrie.TrieEntry
.nextEntry
in class AbstractPatriciaTrie.TrieIterator<K>
protected AbstractPatriciaTrie.TrieEntry<K,V> previousEntry()