net.sf.beanlib.util.concurrent
Class ConcurrentSkipListMap.SubMap<K,V>

java.lang.Object
  extended by net.sf.beanlib.util.AbstractMap<K,V>
      extended by net.sf.beanlib.util.concurrent.ConcurrentSkipListMap.SubMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, ConcurrentMap<K,V>, Map<K,V>, SortedMap<K,V>, ConcurrentNavigableMap<K,V>, NavigableMap<K,V>
Enclosing class:
ConcurrentSkipListMap<K,V>

static final class ConcurrentSkipListMap.SubMap<K,V>
extends AbstractMap<K,V>
implements ConcurrentNavigableMap<K,V>, Cloneable, Serializable

Submaps returned by ConcurrentSkipListMap submap operations represent a subrange of mappings of their underlying maps. Instances of this class support all methods of their underlying maps, differing in that mappings outside their range are ignored, and attempts to add mappings outside their ranges result in IllegalArgumentException. Instances of this class are constructed only using the subMap, headMap, and tailMap methods of their underlying maps.

See Also:
Serialized Form

Nested Class Summary
(package private)  class ConcurrentSkipListMap.SubMap.SubMapEntryIterator
           
(package private)  class ConcurrentSkipListMap.SubMap.SubMapIter<T>
          Variant of main Iter class to traverse through submaps.
(package private)  class ConcurrentSkipListMap.SubMap.SubMapKeyIterator
           
(package private)  class ConcurrentSkipListMap.SubMap.SubMapValueIterator
           
 
Nested classes/interfaces inherited from class net.sf.beanlib.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
private  Set<Map.Entry<K,V>> entrySetView
           
private  K hi
          upper bound key, or null if to end
private  boolean hiInclusive
          inclusion flag for hi
private  boolean isDescending
          direction
private  ConcurrentSkipListMap.KeySet<K> keySetView
           
private  K lo
          lower bound key, or null if from start
private  boolean loInclusive
          inclusion flag for lo
private  ConcurrentSkipListMap<K,V> m
          Underlying map
private static long serialVersionUID
           
private  Collection<V> valuesView
           
 
Constructor Summary
ConcurrentSkipListMap.SubMap(ConcurrentSkipListMap<K,V> map, K fromKey, boolean fromInclusive, K toKey, boolean toInclusive, boolean isDescending)
          Creates a new submap, initializing all fields
 
Method Summary
 Map.Entry<K,V> ceilingEntry(K key)
          Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such key.
 K ceilingKey(K key)
          Returns the least key greater than or equal to the given key, or null if there is no such key.
private  void checkKeyBounds(K key)
           
 void clear()
          
 Comparator<? super K> comparator()
           
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 NavigableSet<K> descendingKeySet()
          Returns a reverse order NavigableSet view of the keys contained in this map.
 ConcurrentSkipListMap.SubMap<K,V> descendingMap()
          Returns a reverse order view of the mappings contained in this map.
(package private)  Iterator<Map.Entry<K,V>> entryIterator()
           
 Set<Map.Entry<K,V>> entrySet()
           
 Map.Entry<K,V> firstEntry()
          Returns a key-value mapping associated with the least key in this map, or null if the map is empty.
 K firstKey()
           
 Map.Entry<K,V> floorEntry(K key)
          Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key.
 K floorKey(K key)
          Returns the greatest key less than or equal to the given key, or null if there is no such key.
 V get(Object key)
          
private  Map.Entry<K,V> getNearEntry(K key, int rel)
          Submap version of ConcurrentSkipListMap.getNearEntry
private  K getNearKey(K key, int rel)
           
 ConcurrentSkipListMap.SubMap<K,V> headMap(K toKey)
          
 ConcurrentSkipListMap.SubMap<K,V> headMap(K toKey, boolean inclusive)
          Returns a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) toKey.
 Map.Entry<K,V> higherEntry(K key)
          Returns a key-value mapping associated with the least key strictly greater than the given key, or null if there is no such key.
 K higherKey(K key)
          Returns the least key strictly greater than the given key, or null if there is no such key.
private  Map.Entry<K,V> highestEntry()
           
private  K highestKey()
          Returns highest absolute key (ignoring directonality)
private  ConcurrentSkipListMap.Node<K,V> hiNode()
          Returns highest node.
private  boolean inBounds(K key)
           
private  boolean isBeforeEnd(ConcurrentSkipListMap.Node<K,V> n)
          Returns true if node key is less than upper bound of range
 boolean isEmpty()
          
(package private)  Iterator<K> keyIterator()
           
 NavigableSet<K> keySet()
          
 Map.Entry<K,V> lastEntry()
          Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.
 K lastKey()
           
private  ConcurrentSkipListMap.Node<K,V> loNode()
          Returns lowest node.
 Map.Entry<K,V> lowerEntry(K key)
          Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key.
 K lowerKey(K key)
          Returns the greatest key strictly less than the given key, or null if there is no such key.
private  Map.Entry<K,V> lowestEntry()
           
private  K lowestKey()
          Returns lowest absolute key (ignoring directonality)
 NavigableSet<K> navigableKeySet()
          Returns a NavigableSet view of the keys contained in this map.
private  ConcurrentSkipListMap.SubMap<K,V> newSubMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
          Utility to create submaps, where given bounds override unbounded(null) ones and/or are checked against bounded ones.
 Map.Entry<K,V> pollFirstEntry()
          Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.
 Map.Entry<K,V> pollLastEntry()
          Removes and returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.
 V put(K key, V value)
          
 V putIfAbsent(K key, V value)
           
 V remove(Object key)
          
 boolean remove(Object key, Object value)
           
private  Map.Entry<K,V> removeHighest()
           
private  Map.Entry<K,V> removeLowest()
           
 V replace(K key, V value)
           
 boolean replace(K key, V oldValue, V newValue)
           
 int size()
          
 ConcurrentSkipListMap.SubMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
          Returns a view of the portion of this map whose keys range from fromKey to toKey.
 ConcurrentSkipListMap.SubMap<K,V> subMap(K fromKey, K toKey)
          
 ConcurrentSkipListMap.SubMap<K,V> tailMap(K fromKey)
          
 ConcurrentSkipListMap.SubMap<K,V> tailMap(K fromKey, boolean inclusive)
          Returns a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) fromKey.
private  boolean tooHigh(K key)
           
private  boolean tooLow(K key)
           
(package private)  Iterator<V> valueIterator()
           
 Collection<V> values()
          
 
Methods inherited from class net.sf.beanlib.util.AbstractMap
clone, equals, hashCode, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

m

private final ConcurrentSkipListMap<K,V> m
Underlying map


lo

private final K lo
lower bound key, or null if from start


hi

private final K hi
upper bound key, or null if to end


loInclusive

private final boolean loInclusive
inclusion flag for lo


hiInclusive

private final boolean hiInclusive
inclusion flag for hi


isDescending

private final boolean isDescending
direction


keySetView

private transient ConcurrentSkipListMap.KeySet<K> keySetView

entrySetView

private transient Set<Map.Entry<K,V>> entrySetView

valuesView

private transient Collection<V> valuesView
Constructor Detail

ConcurrentSkipListMap.SubMap

ConcurrentSkipListMap.SubMap(ConcurrentSkipListMap<K,V> map,
                             K fromKey,
                             boolean fromInclusive,
                             K toKey,
                             boolean toInclusive,
                             boolean isDescending)
Creates a new submap, initializing all fields

Method Detail

tooLow

private boolean tooLow(K key)

tooHigh

private boolean tooHigh(K key)

inBounds

private boolean inBounds(K key)

checkKeyBounds

private void checkKeyBounds(K key)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException

isBeforeEnd

private boolean isBeforeEnd(ConcurrentSkipListMap.Node<K,V> n)
Returns true if node key is less than upper bound of range


loNode

private ConcurrentSkipListMap.Node<K,V> loNode()
Returns lowest node. This node might not be in range, so most usages need to check bounds


hiNode

private ConcurrentSkipListMap.Node<K,V> hiNode()
Returns highest node. This node might not be in range, so most usages need to check bounds


lowestKey

private K lowestKey()
Returns lowest absolute key (ignoring directonality)


highestKey

private K highestKey()
Returns highest absolute key (ignoring directonality)


lowestEntry

private Map.Entry<K,V> lowestEntry()

highestEntry

private Map.Entry<K,V> highestEntry()

removeLowest

private Map.Entry<K,V> removeLowest()

removeHighest

private Map.Entry<K,V> removeHighest()

getNearEntry

private Map.Entry<K,V> getNearEntry(K key,
                                    int rel)
Submap version of ConcurrentSkipListMap.getNearEntry


getNearKey

private K getNearKey(K key,
                     int rel)

containsKey

public boolean containsKey(Object key)
Description copied from class: AbstractMap

This implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, true is returned. If the iteration terminates without finding such an entry, false is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.

Specified by:
containsKey in interface Map<K,V>
Overrides:
containsKey in class AbstractMap<K,V>

get

public V get(Object key)
Description copied from class: AbstractMap

This implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, the entry's value is returned. If the iteration terminates without finding such an entry, null is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.

Specified by:
get in interface Map<K,V>
Overrides:
get in class AbstractMap<K,V>

put

public V put(K key,
             V value)
Description copied from class: AbstractMap

This implementation always throws an UnsupportedOperationException.

Specified by:
put in interface Map<K,V>
Overrides:
put in class AbstractMap<K,V>

remove

public V remove(Object key)
Description copied from class: AbstractMap

This implementation iterates over entrySet() searching for an entry with the specified key. If such an entry is found, its value is obtained with its getValue operation, the entry is removed from the collection (and the backing map) with the iterator's remove operation, and the saved value is returned. If the iteration terminates without finding such an entry, null is returned. Note that this implementation requires linear time in the size of the map; many implementations will override this method.

Note that this implementation throws an UnsupportedOperationException if the entrySet iterator does not support the remove method and this map contains a mapping for the specified key.

Specified by:
remove in interface Map<K,V>
Overrides:
remove in class AbstractMap<K,V>

size

public int size()
Description copied from class: AbstractMap

This implementation returns entrySet().size().

Specified by:
size in interface Map<K,V>
Overrides:
size in class AbstractMap<K,V>

isEmpty

public boolean isEmpty()
Description copied from class: AbstractMap

This implementation returns size() == 0.

Specified by:
isEmpty in interface Map<K,V>
Overrides:
isEmpty in class AbstractMap<K,V>

containsValue

public boolean containsValue(Object value)
Description copied from class: AbstractMap

This implementation iterates over entrySet() searching for an entry with the specified value. If such an entry is found, true is returned. If the iteration terminates without finding such an entry, false is returned. Note that this implementation requires linear time in the size of the map.

Specified by:
containsValue in interface Map<K,V>
Overrides:
containsValue in class AbstractMap<K,V>

clear

public void clear()
Description copied from class: AbstractMap

This implementation calls entrySet().clear().

Note that this implementation throws an UnsupportedOperationException if the entrySet does not support the clear operation.

Specified by:
clear in interface Map<K,V>
Overrides:
clear in class AbstractMap<K,V>

putIfAbsent

public V putIfAbsent(K key,
                     V value)
Specified by:
putIfAbsent in interface ConcurrentMap<K,V>

remove

public boolean remove(Object key,
                      Object value)
Specified by:
remove in interface ConcurrentMap<K,V>

replace

public boolean replace(K key,
                       V oldValue,
                       V newValue)
Specified by:
replace in interface ConcurrentMap<K,V>

replace

public V replace(K key,
                 V value)
Specified by:
replace in interface ConcurrentMap<K,V>

comparator

public Comparator<? super K> comparator()
Specified by:
comparator in interface SortedMap<K,V>

newSubMap

private ConcurrentSkipListMap.SubMap<K,V> newSubMap(K fromKey,
                                                    boolean fromInclusive,
                                                    K toKey,
                                                    boolean toInclusive)
Utility to create submaps, where given bounds override unbounded(null) ones and/or are checked against bounded ones.


subMap

public ConcurrentSkipListMap.SubMap<K,V> subMap(K fromKey,
                                                boolean fromInclusive,
                                                K toKey,
                                                boolean toInclusive)
Description copied from interface: NavigableMap
Returns a view of the portion of this map whose keys range from fromKey to toKey. If fromKey and toKey are equal, the returned map is empty unless fromExclusive and toExclusive are both true. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside of its range, or to construct a submap either of whose endpoints lie outside its range.

Specified by:
subMap in interface ConcurrentNavigableMap<K,V>
Specified by:
subMap in interface NavigableMap<K,V>
Parameters:
fromKey - low endpoint of the keys in the returned map
fromInclusive - true if the low endpoint is to be included in the returned view
toKey - high endpoint of the keys in the returned map
toInclusive - true if the high endpoint is to be included in the returned view
Returns:
a view of the portion of this map whose keys range from fromKey to toKey

headMap

public ConcurrentSkipListMap.SubMap<K,V> headMap(K toKey,
                                                 boolean inclusive)
Description copied from interface: NavigableMap
Returns a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) toKey. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Specified by:
headMap in interface ConcurrentNavigableMap<K,V>
Specified by:
headMap in interface NavigableMap<K,V>
Parameters:
toKey - high endpoint of the keys in the returned map
inclusive - true if the high endpoint is to be included in the returned view
Returns:
a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) toKey

tailMap

public ConcurrentSkipListMap.SubMap<K,V> tailMap(K fromKey,
                                                 boolean inclusive)
Description copied from interface: NavigableMap
Returns a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) fromKey. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Specified by:
tailMap in interface ConcurrentNavigableMap<K,V>
Specified by:
tailMap in interface NavigableMap<K,V>
Parameters:
fromKey - low endpoint of the keys in the returned map
inclusive - true if the low endpoint is to be included in the returned view
Returns:
a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) fromKey

subMap

public ConcurrentSkipListMap.SubMap<K,V> subMap(K fromKey,
                                                K toKey)
Description copied from interface: NavigableMap

Equivalent to subMap(fromKey, true, toKey, false).

Specified by:
subMap in interface SortedMap<K,V>
Specified by:
subMap in interface ConcurrentNavigableMap<K,V>
Specified by:
subMap in interface NavigableMap<K,V>

headMap

public ConcurrentSkipListMap.SubMap<K,V> headMap(K toKey)
Description copied from interface: NavigableMap

Equivalent to headMap(toKey, false).

Specified by:
headMap in interface SortedMap<K,V>
Specified by:
headMap in interface ConcurrentNavigableMap<K,V>
Specified by:
headMap in interface NavigableMap<K,V>

tailMap

public ConcurrentSkipListMap.SubMap<K,V> tailMap(K fromKey)
Description copied from interface: NavigableMap

Equivalent to tailMap(fromKey, true).

Specified by:
tailMap in interface SortedMap<K,V>
Specified by:
tailMap in interface ConcurrentNavigableMap<K,V>
Specified by:
tailMap in interface NavigableMap<K,V>

descendingMap

public ConcurrentSkipListMap.SubMap<K,V> descendingMap()
Description copied from interface: ConcurrentNavigableMap
Returns a reverse order view of the mappings contained in this map. The descending map is backed by this map, so changes to the map are reflected in the descending map, and vice-versa.

The returned map has an ordering equivalent to Collections.reverseOrder(comparator()). The expression m.descendingMap().descendingMap() returns a view of m essentially equivalent to m.

Specified by:
descendingMap in interface ConcurrentNavigableMap<K,V>
Specified by:
descendingMap in interface NavigableMap<K,V>
Returns:
a reverse order view of this map

ceilingEntry

public Map.Entry<K,V> ceilingEntry(K key)
Description copied from interface: NavigableMap
Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such key.

Specified by:
ceilingEntry in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
an entry with the least key greater than or equal to key, or null if there is no such key

ceilingKey

public K ceilingKey(K key)
Description copied from interface: NavigableMap
Returns the least key greater than or equal to the given key, or null if there is no such key.

Specified by:
ceilingKey in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
the least key greater than or equal to key, or null if there is no such key

lowerEntry

public Map.Entry<K,V> lowerEntry(K key)
Description copied from interface: NavigableMap
Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key.

Specified by:
lowerEntry in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
an entry with the greatest key less than key, or null if there is no such key

lowerKey

public K lowerKey(K key)
Description copied from interface: NavigableMap
Returns the greatest key strictly less than the given key, or null if there is no such key.

Specified by:
lowerKey in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
the greatest key less than key, or null if there is no such key

floorEntry

public Map.Entry<K,V> floorEntry(K key)
Description copied from interface: NavigableMap
Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key.

Specified by:
floorEntry in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
an entry with the greatest key less than or equal to key, or null if there is no such key

floorKey

public K floorKey(K key)
Description copied from interface: NavigableMap
Returns the greatest key less than or equal to the given key, or null if there is no such key.

Specified by:
floorKey in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
the greatest key less than or equal to key, or null if there is no such key

higherEntry

public Map.Entry<K,V> higherEntry(K key)
Description copied from interface: NavigableMap
Returns a key-value mapping associated with the least key strictly greater than the given key, or null if there is no such key.

Specified by:
higherEntry in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
an entry with the least key greater than key, or null if there is no such key

higherKey

public K higherKey(K key)
Description copied from interface: NavigableMap
Returns the least key strictly greater than the given key, or null if there is no such key.

Specified by:
higherKey in interface NavigableMap<K,V>
Parameters:
key - the key
Returns:
the least key greater than key, or null if there is no such key

firstKey

public K firstKey()
Specified by:
firstKey in interface SortedMap<K,V>

lastKey

public K lastKey()
Specified by:
lastKey in interface SortedMap<K,V>

firstEntry

public Map.Entry<K,V> firstEntry()
Description copied from interface: NavigableMap
Returns a key-value mapping associated with the least key in this map, or null if the map is empty.

Specified by:
firstEntry in interface NavigableMap<K,V>
Returns:
an entry with the least key, or null if this map is empty

lastEntry

public Map.Entry<K,V> lastEntry()
Description copied from interface: NavigableMap
Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.

Specified by:
lastEntry in interface NavigableMap<K,V>
Returns:
an entry with the greatest key, or null if this map is empty

pollFirstEntry

public Map.Entry<K,V> pollFirstEntry()
Description copied from interface: NavigableMap
Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.

Specified by:
pollFirstEntry in interface NavigableMap<K,V>
Returns:
the removed first entry of this map, or null if this map is empty

pollLastEntry

public Map.Entry<K,V> pollLastEntry()
Description copied from interface: NavigableMap
Removes and returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.

Specified by:
pollLastEntry in interface NavigableMap<K,V>
Returns:
the removed last entry of this map, or null if this map is empty

keySet

public NavigableSet<K> keySet()
Description copied from class: AbstractMap

This implementation returns a set that subclasses AbstractSet. The subclass's iterator method returns a "wrapper object" over this map's entrySet() iterator. The size method delegates to this map's size method and the contains method delegates to this map's containsKey method.

The set is created the first time this method is called, and returned in response to all subsequent calls. No synchronization is performed, so there is a slight chance that multiple calls to this method will not all return the same set.

Specified by:
keySet in interface Map<K,V>
Specified by:
keySet in interface ConcurrentNavigableMap<K,V>
Overrides:
keySet in class AbstractMap<K,V>
Returns:
a navigable set view of the keys in this map

navigableKeySet

public NavigableSet<K> navigableKeySet()
Description copied from interface: ConcurrentNavigableMap
Returns a NavigableSet view of the keys contained in this map. The set's iterator returns the keys in ascending order. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.

Specified by:
navigableKeySet in interface ConcurrentNavigableMap<K,V>
Specified by:
navigableKeySet in interface NavigableMap<K,V>
Returns:
a navigable set view of the keys in this map

values

public Collection<V> values()
Description copied from class: AbstractMap

This implementation returns a collection that subclasses AbstractCollection. The subclass's iterator method returns a "wrapper object" over this map's entrySet() iterator. The size method delegates to this map's size method and the contains method delegates to this map's containsValue method.

The collection is created the first time this method is called, and returned in response to all subsequent calls. No synchronization is performed, so there is a slight chance that multiple calls to this method will not all return the same collection.

Specified by:
values in interface Map<K,V>
Overrides:
values in class AbstractMap<K,V>

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V>
Specified by:
entrySet in class AbstractMap<K,V>

descendingKeySet

public NavigableSet<K> descendingKeySet()
Description copied from interface: ConcurrentNavigableMap
Returns a reverse order NavigableSet view of the keys contained in this map. The set's iterator returns the keys in descending order. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.

Specified by:
descendingKeySet in interface ConcurrentNavigableMap<K,V>
Specified by:
descendingKeySet in interface NavigableMap<K,V>
Returns:
a reverse order navigable set view of the keys in this map

keyIterator

Iterator<K> keyIterator()

valueIterator

Iterator<V> valueIterator()

entryIterator

Iterator<Map.Entry<K,V>> entryIterator()