K - the type of keys maintained by this mapV - the type of mapped valuespublic class StrictHashMap<K,V> extends AbstractHashMap<K,V> implements Serializable
Map implementation that uses direct objects comparison for keys and values instead of relying on Object.equals(Object).AbstractHashMap,
Serialized FormAbstractHashMap.EntrySet<K,V>, AbstractHashMap.EntrySetIterator<K,V>, AbstractHashMap.HashEntry<K,V>, AbstractHashMap.HashIterator<K,V,T>, AbstractHashMap.HashMapIterator<K,V>, AbstractHashMap.KeySet<K,V>, AbstractHashMap.KeySetIterator<K,V>, AbstractHashMap.Values<K,V>, AbstractHashMap.ValuesIterator<K,V>AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>data, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_THRESHOLD, entrySet, GETKEY_INVALID, GETVALUE_INVALID, keySet, loadFactor, MAXIMUM_CAPACITY, modCount, NO_NEXT_ENTRY, NO_PREVIOUS_ENTRY, NULL, REMOVE_INVALID, SETVALUE_INVALID, size, threshold, values| Constructor and Description |
|---|
StrictHashMap()
Constructs new
StrictHashMap. |
StrictHashMap(int initialCapacity)
Constructs new
StrictHashMap. |
StrictHashMap(int initialCapacity,
float loadFactor)
Constructs new
StrictHashMap. |
StrictHashMap(int initialCapacity,
float loadFactor,
int threshold)
Constructs new
StrictHashMap. |
StrictHashMap(Map map)
Constructs new
StrictHashMap. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isEqualKey(Object key1,
Object key2)
Compares two keys, in internal converted form, to see if they are equal.
|
protected boolean |
isEqualValue(Object value1,
Object value2)
Compares two values, in external form, to see if they are equal.
|
addEntry, addMapping, calculateNewCapacity, calculateThreshold, checkCapacity, clear, clone, containsKey, containsValue, convertKey, createEntry, createEntrySetIterator, createKeySetIterator, createValuesIterator, destroyEntry, doReadObject, doWriteObject, ensureCapacity, entryHashCode, entryKey, entryNext, entrySet, entryValue, equals, get, getEntry, hash, hashCode, hashIndex, init, isEmpty, keySet, mapIterator, put, putAll, remove, removeEntry, removeMapping, reuseEntry, size, toString, updateEntry, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic StrictHashMap()
StrictHashMap.public StrictHashMap(int initialCapacity)
StrictHashMap.initialCapacity - the initial capacity, must be a power of twopublic StrictHashMap(int initialCapacity,
float loadFactor)
StrictHashMap.initialCapacity - the initial capacity, must be a power of twoloadFactor - the load factor, must be > 0.0f and generally < 1.0fpublic StrictHashMap(int initialCapacity,
float loadFactor,
int threshold)
StrictHashMap.initialCapacity - the initial capacity, must be a power of twoloadFactor - the load factor, must be > 0.0f and generally < 1.0fthreshold - the threshold, must be sensiblepublic StrictHashMap(@NotNull Map map)
StrictHashMap.map - the map to copyprotected boolean isEqualKey(@Nullable Object key1, @Nullable Object key2)
AbstractHashMapisEqualKey in class AbstractHashMap<K,V>key1 - the first key to compare passed in from outsidekey2 - the second key extracted from the entry via entry.keyprotected boolean isEqualValue(@Nullable Object value1, @Nullable Object value2)
AbstractHashMapisEqualValue in class AbstractHashMap<K,V>value1 - the first value to compare passed in from outsidevalue2 - the second value extracted from the entry via getValue()Copyright © 2020. All rights reserved.