K
- The type of keys maintained by this map.V
- The type of mapped values.public class TreeBiMap<K,V> extends BiMap<K,V> implements Cloneable, NavigableMap<K,V>, Serializable
BiMap
,
TreeMap
,
Serialized FormAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
target
Modifier | Constructor and Description |
---|---|
|
TreeBiMap()
Constructs an empty
TreeBiMap , using the natural ordering of its
keys. |
protected |
TreeBiMap(boolean empty)
Creates an empty instance.
|
|
TreeBiMap(Comparator<? super K> keyComparator,
Comparator<? super V> valueComparator)
Constructs an empty
TreeBiMap ordered according to the given
comparator. |
|
TreeBiMap(Map<? extends K,? extends V> m)
|
|
TreeBiMap(SortedMap<? extends K,? extends V> m,
Comparator<? super V> valueComparator)
|
containsValue, entrySet, keySet, reverse, setTarget, values
clear, compute, computeIfAbsent, computeIfPresent, containsKey, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, superCompute, superComputeIfAbsent, superComputeIfPresent, superForEach, superGetOrDefault, superMerge, superPutIfAbsent, superRemove, superReplace, superReplace, superReplaceAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
public TreeBiMap(Comparator<? super K> keyComparator, Comparator<? super V> valueComparator)
TreeBiMap
ordered according to the given
comparator.keyComparator
- The comparator that will be used to order the forward
map. If null
, the natural ordering
of the keys will be used.valueComparator
- The comparator that will be used to order the
reverse map. If null
, the natural
ordering of the keys will be used.public TreeBiMap(Map<? extends K,? extends V> m)
m
- The map whose mappings are to be placed in this map.NullPointerException
- If the specified map is null.public TreeBiMap(SortedMap<? extends K,? extends V> m, Comparator<? super V> valueComparator)
m
- The map whose mappings are to be placed in this map.valueComparator
- The comparator that will be used to order the
reverse map. If null
, the natural
ordering of the keys will be used.NullPointerException
- If the specified map is null.public TreeBiMap()
TreeBiMap
, using the natural ordering of its
keys.protected TreeBiMap(boolean empty)
empty
- Ignored parameter.protected BiMap<V,K> newEmptyReverseMap()
BiMap
BiMap
.newEmptyReverseMap
in class BiMap<K,V>
BiMap
.public Comparator<? super K> comparator()
comparator
in interface SortedMap<K,V>
public Map.Entry<K,V> lowerEntry(K key)
lowerEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> floorEntry(K key)
floorEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> ceilingEntry(K key)
ceilingEntry
in interface NavigableMap<K,V>
public K ceilingKey(K key)
ceilingKey
in interface NavigableMap<K,V>
public Map.Entry<K,V> higherEntry(K key)
higherEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> firstEntry()
firstEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> pollFirstEntry()
pollFirstEntry
in interface NavigableMap<K,V>
public Map.Entry<K,V> pollLastEntry()
pollLastEntry
in interface NavigableMap<K,V>
public NavigableMap<K,V> descendingMap()
descendingMap
in interface NavigableMap<K,V>
public NavigableSet<K> navigableKeySet()
navigableKeySet
in interface NavigableMap<K,V>
public NavigableSet<K> descendingKeySet()
descendingKeySet
in interface NavigableMap<K,V>
public NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
subMap
in interface NavigableMap<K,V>
public NavigableMap<K,V> headMap(K toKey, boolean inclusive)
headMap
in interface NavigableMap<K,V>
public NavigableMap<K,V> tailMap(K fromKey, boolean inclusive)
tailMap
in interface NavigableMap<K,V>
Copyright © 2020 LibJ. All rights reserved.