Package gw.util
Class DerivedKeyHashMap<K,V>
java.lang.Object
gw.util.DerivedKeyHashMap<K,V>
- All Implemented Interfaces:
Map<K,V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate classprivate classprivate class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()private VfindValueWithMatchingKeyInChain(Object key, Object entry) protected abstract KgetKeyForValue(V value) protected intprivate booleanhasMatchingValueInChain(Object value, Object entry) booleanisEmpty()protected abstract booleankeyMatches(Object key, V value) keySet()protected abstract doublevoidprivate voidresize(int newTableSize) intsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
_table
-
_size
private int _size
-
-
Constructor Details
-
DerivedKeyHashMap
public DerivedKeyHashMap() -
DerivedKeyHashMap
-
-
Method Details
-
hash
-
keyMatches
-
getKeyForValue
-
loadFactor
protected abstract double loadFactor() -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
get
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
put
-
remove
-
putAll
-
clear
public void clear() -
entrySet
-
keySet
-
values
-
findValueWithMatchingKeyInChain
-
hasMatchingValueInChain
-
bucket
-
putImpl
-
resize
private void resize(int newTableSize)
-