K1
- first key typeK2
- second key typeK3
- third key typeK4
- fourth key typeV
- value typepublic final class HashedQuaternaryKeyMap<K1,K2,K3,K4,V> extends Object implements QuaternaryKeyMap<K1,K2,K3,K4,V>
Constructor and Description |
---|
HashedQuaternaryKeyMap()
Create a new empty HashedQuaternaryKeyMap.
|
HashedQuaternaryKeyMap(int initialCapacity,
float loadFactor,
int threshold)
Create a new empty HashedQuaternaryKeyMap with the specified
initial capacity, load factor, and threshold.
|
HashedQuaternaryKeyMap(Map<? extends QuaternaryKey<K1,K2,K3,K4>,? extends V> map)
Create a new HashedQuaternaryKeyMap with the same mappings as
the specified map (copy constructor).
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the map, resetting the size to zero and nullifying references
to avoid garbage collection issues.
|
boolean |
containsKey(K1 key1,
K2 key2,
K3 key3,
K4 key4)
Return true if this map contains a quaternary key of {
key1, key2, key3, key4 }. |
boolean |
containsKey(Object key)
Checks whether the map contains the specified key.
|
boolean |
containsValue(Object value)
Checks whether the map contains the specified value.
|
Set<Map.Entry<K,V>> |
entrySet()
Gets the entrySet view of the map.
|
boolean |
equals(Object obj)
Compares this map with another.
|
V |
get(K1 key1,
K2 key2,
K3 key3,
K4 key4)
Return the value mapped to a quaternary key of {
key1, key2, key3, key4 }, if any. |
V |
get(Object key)
Gets the value mapped to the key specified.
|
int |
hashCode()
Gets the standard Map hashCode.
|
boolean |
isEmpty()
Checks whether the map is currently empty.
|
Set<K> |
keySet()
Gets the keySet view of the map.
|
V |
put(K1 key1,
K2 key2,
K3 key3,
K4 key4,
V value)
Map a quaternary key of {
key1, key2, key3, key4 } to the specified value
(optional operation). |
V |
put(QuaternaryKey<K1,K2,K3,K4> key,
V value)
Puts a key-value mapping into this map.
|
void |
putAll(Map<? extends K,? extends V> map)
Puts all the values from the specified map into this map.
|
V |
remove(Object key)
Removes the specified mapping from this map.
|
V |
removeKey(K1 key1,
K2 key2,
K3 key3,
K4 key4)
Remove the mapping for a quaternary key of {
key1, key2, key3, key4 } from this map
if one exists (optional operation). |
int |
size()
Gets the size of the map.
|
String |
toString()
Gets the map as a String.
|
Collection<V> |
values()
Gets the values view of the map.
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public HashedQuaternaryKeyMap()
public HashedQuaternaryKeyMap(int initialCapacity, float loadFactor, int threshold)
initialCapacity
- initial capacityloadFactor
- load factorthreshold
- thresholdpublic boolean containsKey(K1 key1, K2 key2, K3 key3, K4 key4)
QuaternaryKeyMap
key1, key2, key3, key4
}.containsKey
in interface QuaternaryKeyMap<K1,K2,K3,K4,V>
key1
- first keykey2
- second keykey3
- third keykey4
- fourth keykey1, key2, key3, key4
}public V get(K1 key1, K2 key2, K3 key3, K4 key4)
QuaternaryKeyMap
key1, key2, key3, key4
}, if any.public V put(K1 key1, K2 key2, K3 key3, K4 key4, V value)
QuaternaryKeyMap
key1, key2, key3, key4
} to the specified value
(optional operation).public V removeKey(K1 key1, K2 key2, K3 key3, K4 key4)
QuaternaryKeyMap
key1, key2, key3, key4
} from this map
if one exists (optional operation).public V get(Object key)
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
key
- the key to search forpublic boolean containsValue(Object value)
containsValue
in interface Map<K,V>
value
- the value to search forpublic void putAll(Map<? extends K,? extends V> map)
put(Object, Object)
.putAll
in interface Map<K,V>
map
- the map to addNullPointerException
- if the map is nullpublic V remove(Object key)
public void clear()
public Set<Map.Entry<K,V>> entrySet()
public Set<K> keySet()
public Collection<V> values()
public boolean equals(Object obj)
public int hashCode()
Copyright (c) 2007-2016 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).