Class TreeBidiMap.ViewMapIterator
- java.lang.Object
-
- org.apache.commons.collections4.bidimap.TreeBidiMap.ViewIterator
-
- org.apache.commons.collections4.bidimap.TreeBidiMap.ViewMapIterator
-
- All Implemented Interfaces:
Iterator<K>,MapIterator<K,V>,OrderedIterator<K>,OrderedMapIterator<K,V>
- Enclosing class:
- TreeBidiMap<K extends Comparable<K>,V extends Comparable<V>>
class TreeBidiMap.ViewMapIterator extends TreeBidiMap.ViewIterator implements OrderedMapIterator<K,V>
An iterator over the map.
-
-
Field Summary
-
Fields inherited from class org.apache.commons.collections4.bidimap.TreeBidiMap.ViewIterator
lastReturnedNode
-
-
Constructor Summary
Constructors Constructor Description ViewMapIterator(TreeBidiMap.DataElement orderType)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KgetKey()Gets the current key, which is the key returned by the last call tonext().VgetValue()Gets the current value, which is the value associated with the last key returned bynext().Knext()Gets the next key from theMap.Kprevious()Gets the previous key from theMap.VsetValue(V obj)Sets the value associated with the current key (optional operation).-
Methods inherited from class org.apache.commons.collections4.bidimap.TreeBidiMap.ViewIterator
hasNext, hasPrevious, navigateNext, navigatePrevious, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Methods inherited from interface org.apache.commons.collections4.MapIterator
hasNext, remove
-
Methods inherited from interface org.apache.commons.collections4.OrderedMapIterator
hasPrevious
-
-
-
-
Constructor Detail
-
ViewMapIterator
ViewMapIterator(TreeBidiMap.DataElement orderType)
Constructor.
-
-
Method Detail
-
getKey
public K getKey()
Description copied from interface:MapIteratorGets the current key, which is the key returned by the last call tonext().- Specified by:
getKeyin interfaceMapIterator<K extends Comparable<K>,V extends Comparable<V>>- Returns:
- the current key
-
getValue
public V getValue()
Description copied from interface:MapIteratorGets the current value, which is the value associated with the last key returned bynext().- Specified by:
getValuein interfaceMapIterator<K extends Comparable<K>,V extends Comparable<V>>- Returns:
- the current value
-
setValue
public V setValue(V obj)
Description copied from interface:MapIteratorSets the value associated with the current key (optional operation).- Specified by:
setValuein interfaceMapIterator<K extends Comparable<K>,V extends Comparable<V>>- Parameters:
obj- the new value- Returns:
- the previous value
-
next
public K next()
Description copied from interface:MapIteratorGets the next key from theMap.- Specified by:
nextin interfaceIterator<K extends Comparable<K>>- Specified by:
nextin interfaceMapIterator<K extends Comparable<K>,V extends Comparable<V>>- Returns:
- the next key in the iteration
-
previous
public K previous()
Description copied from interface:OrderedMapIteratorGets the previous key from theMap.- Specified by:
previousin interfaceOrderedIterator<K extends Comparable<K>>- Specified by:
previousin interfaceOrderedMapIterator<K extends Comparable<K>,V extends Comparable<V>>- Returns:
- the previous key in the iteration
-
-