K - the type of keys maintained by this map.V - the type of mapped values.public class PackedMap<K,V> extends AbstractPackedMap<K,V>
AbstractPackedMap class, using object-equality when comparing keys. In other words,
in an PackedMap, two keys k1 and k2 are considered equal if and only if (k1.equals(k2)) (with k1 not
null for sure as long as this map does not accept null keys).keysValues| Constructor and Description |
|---|
PackedMap()
Constructs an empty map.
|
PackedMap(PackedMap<K,V> map)
Constructs a map with the same mappings as the specified map.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a shallow copy of this map instance: the keys and values themselves are not cloned.
|
protected boolean |
isSame(java.lang.Object key,
java.lang.Object candidateKey)
Checks whether two keys are equal or not.
|
clear, containsKey, containsUnwrappedKey, containsValue, equals, get, getKeyHashCode, getWrappedKeyHashCode, hashCode, isEmpty, keySet, put, remove, size, unwrapKey, values, wrapKeypublic java.lang.Object clone()
AbstractPackedMapclone in class AbstractPackedMap<K,V>protected boolean isSame(java.lang.Object key,
@Nullable
java.lang.Object candidateKey)
AbstractPackedMapnull.isSame in class AbstractPackedMap<K,V>key - the key searched in the map.candidateKey - the key in the map to compare with. Can be null if and only if AbstractPackedMap.unwrapKey(Object)
implementation can return null.true if the two keys are equal, false otherwise.