K
- The type of keys maintained by this map.V
- The type of mapped values.public class HashBiMap<K,V> extends BiMap<K,V> implements Cloneable, Serializable
BiMap
,
HashMap
,
Serialized FormAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
target
Modifier | Constructor and Description |
---|---|
|
HashBiMap()
Constructs an empty
HashBiMap with the default initial capacity
(16) and the default load factor (0.75). |
protected |
HashBiMap(boolean empty)
Creates an empty instance.
|
|
HashBiMap(int initialCapacity)
Constructs an empty
HashBiMap with the specified initial capacity
and the default load factor (0.75). |
|
HashBiMap(int initialCapacity,
float loadFactor)
Constructs an empty
HashBiMap with the specified initial capacity
and load factor. |
|
HashBiMap(Map<? extends K,? extends V> m)
|
Modifier and Type | Method and Description |
---|---|
HashBiMap<K,V> |
clone() |
protected BiMap<V,K> |
newEmptyReverseMap()
Returns a new instance of an empty reverse subclass of
BiMap . |
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
public HashBiMap(int initialCapacity, float loadFactor)
HashBiMap
with the specified initial capacity
and load factor.initialCapacity
- The initial capacity.loadFactor
- The load factor.IllegalArgumentException
- If the initial capacity is negative or the
load factor is nonpositive.public HashBiMap(int initialCapacity)
HashBiMap
with the specified initial capacity
and the default load factor (0.75).initialCapacity
- The initial capacity.IllegalArgumentException
- If the initial capacity is negative.public HashBiMap(Map<? extends K,? extends V> m)
HashBiMap
with the same mappings as the specified
Map
. The HashBiMap
is created with default load factor
(0.75) and an initial capacity sufficient to hold the mappings in the
specified Map
.m
- The map whose mappings are to be placed in this map.NullPointerException
- If the specified map is null.public HashBiMap()
HashBiMap
with the default initial capacity
(16) and the default load factor (0.75).protected HashBiMap(boolean empty)
empty
- Ignored parameter.Copyright © 2020 LibJ. All rights reserved.