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 class
private class
private class
private class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
void
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
private V
findValueWithMatchingKeyInChain
(Object key, Object entry) protected abstract K
getKeyForValue
(V value) protected int
private boolean
hasMatchingValueInChain
(Object value, Object entry) boolean
isEmpty()
protected abstract boolean
keyMatches
(Object key, V value) keySet()
protected abstract double
void
private void
resize
(int newTableSize) int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<K,
V>
-
get
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
put
-
remove
-
putAll
-
clear
public void clear() -
entrySet
-
keySet
-
values
-
findValueWithMatchingKeyInChain
-
hasMatchingValueInChain
-
bucket
-
putImpl
-
resize
private void resize(int newTableSize)
-