@Beta protected class ForwardingNavigableMap.StandardDescendingMap extends ForwardingMap<K,V>
NavigableMap.descendingMap()
in terms of the methods of this
NavigableMap
. In many cases, you may wish to override ForwardingNavigableMap.descendingMap()
to forward to this implementation or a subclass thereof.
In particular, this map iterates over entries with repeated calls to NavigableMap.lowerEntry(K)
. If a more efficient means of iteration is available, you may wish to
override the entryIterator()
method of this class.
ForwardingMap.StandardEntrySet, ForwardingMap.StandardKeySet, ForwardingMap.StandardValues
Constructor and Description |
---|
StandardDescendingMap()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map.Entry<K,V> |
ceilingEntry(K key) |
K |
ceilingKey(K key) |
java.util.Comparator<? super K> |
comparator() |
protected java.util.Map<K,V> |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
java.util.NavigableSet<K> |
descendingKeySet() |
java.util.NavigableMap<K,V> |
descendingMap() |
protected java.util.Iterator<java.util.Map.Entry<K,V>> |
entryIterator() |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
java.util.Map.Entry<K,V> |
firstEntry() |
K |
firstKey() |
java.util.Map.Entry<K,V> |
floorEntry(K key) |
K |
floorKey(K key) |
java.util.SortedMap<K,V> |
headMap(K toKey) |
java.util.NavigableMap<K,V> |
headMap(K toKey,
boolean inclusive) |
java.util.Map.Entry<K,V> |
higherEntry(K key) |
K |
higherKey(K key) |
java.util.Set<K> |
keySet() |
java.util.Map.Entry<K,V> |
lastEntry() |
K |
lastKey() |
java.util.Map.Entry<K,V> |
lowerEntry(K key) |
K |
lowerKey(K key) |
java.util.NavigableSet<K> |
navigableKeySet() |
java.util.Map.Entry<K,V> |
pollFirstEntry() |
java.util.Map.Entry<K,V> |
pollLastEntry() |
void |
replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function) |
java.util.NavigableMap<K,V> |
subMap(K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive) |
java.util.SortedMap<K,V> |
subMap(K fromKey,
K toKey) |
java.util.SortedMap<K,V> |
tailMap(K fromKey) |
java.util.NavigableMap<K,V> |
tailMap(K fromKey,
boolean inclusive) |
java.lang.String |
toString()
Returns the string representation generated by the delegate's
toString method. |
java.util.Collection<V> |
values() |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size, standardClear, standardContainsKey, standardContainsValue, standardEquals, standardHashCode, standardIsEmpty, standardPutAll, standardRemove, standardToString
public StandardDescendingMap()
public void replaceAll(java.util.function.BiFunction<? super K,? super V,? extends V> function)
protected java.util.Iterator<java.util.Map.Entry<K,V>> entryIterator()
protected final java.util.Map<K,V> delegate()
ForwardingObject
ForwardingSet.delegate()
. Concrete subclasses override this method to supply the
instance being decorated.delegate
in class ForwardingMap<K,V>
public java.util.Comparator<? super K> comparator()
comparator
in interface java.util.SortedMap<K,V>
public K firstKey()
firstKey
in interface java.util.SortedMap<K,V>
public K lastKey()
lastKey
in interface java.util.SortedMap<K,V>
public java.util.Map.Entry<K,V> lowerEntry(K key)
lowerEntry
in interface java.util.NavigableMap<K,V>
public K lowerKey(K key)
lowerKey
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> floorEntry(K key)
floorEntry
in interface java.util.NavigableMap<K,V>
public K floorKey(K key)
floorKey
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> ceilingEntry(K key)
ceilingEntry
in interface java.util.NavigableMap<K,V>
public K ceilingKey(K key)
ceilingKey
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> higherEntry(K key)
higherEntry
in interface java.util.NavigableMap<K,V>
public K higherKey(K key)
higherKey
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> firstEntry()
firstEntry
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> lastEntry()
lastEntry
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> pollFirstEntry()
pollFirstEntry
in interface java.util.NavigableMap<K,V>
public java.util.Map.Entry<K,V> pollLastEntry()
pollLastEntry
in interface java.util.NavigableMap<K,V>
public java.util.NavigableMap<K,V> descendingMap()
descendingMap
in interface java.util.NavigableMap<K,V>
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet
in interface java.util.Map<K,V>
entrySet
in interface java.util.SortedMap<K,V>
entrySet
in class ForwardingMap<K,V>
public java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,V>
keySet
in interface java.util.SortedMap<K,V>
keySet
in class ForwardingMap<K,V>
public java.util.NavigableSet<K> navigableKeySet()
navigableKeySet
in interface java.util.NavigableMap<K,V>
public java.util.NavigableSet<K> descendingKeySet()
descendingKeySet
in interface java.util.NavigableMap<K,V>
public java.util.NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
subMap
in interface java.util.NavigableMap<K,V>
public java.util.SortedMap<K,V> subMap(K fromKey, K toKey)
subMap
in interface java.util.NavigableMap<K,V>
subMap
in interface java.util.SortedMap<K,V>
public java.util.NavigableMap<K,V> headMap(K toKey, boolean inclusive)
headMap
in interface java.util.NavigableMap<K,V>
public java.util.SortedMap<K,V> headMap(K toKey)
headMap
in interface java.util.NavigableMap<K,V>
headMap
in interface java.util.SortedMap<K,V>
public java.util.NavigableMap<K,V> tailMap(K fromKey, boolean inclusive)
tailMap
in interface java.util.NavigableMap<K,V>
public java.util.SortedMap<K,V> tailMap(K fromKey)
tailMap
in interface java.util.NavigableMap<K,V>
tailMap
in interface java.util.SortedMap<K,V>
public java.util.Collection<V> values()
values
in interface java.util.Map<K,V>
values
in interface java.util.SortedMap<K,V>
values
in class ForwardingMap<K,V>
public java.lang.String toString()
ForwardingObject
toString
method.toString
in class ForwardingObject
Copyright © 2010–2021 JBoss by Red Hat. All rights reserved.