Package org.infinispan.commons.util
Class HopscotchHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.infinispan.commons.util.ArrayMap<K,V>
org.infinispan.commons.util.HopscotchHashMap<K,V>
- All Implemented Interfaces:
Map<K,
V>
Lookup on a table without collisions will require only single access, if there are collisions it will be
limited to (number of collisions to particular bin + 1) and all those will lie in proximity (32 * reference size).
Inserts can be O(n) in the worst case when we have to rehash whole table or search through close-to-full for an empty
spot.
Not thread safe (though, look-ups are safe when there are no concurrent modifications).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.infinispan.commons.util.ArrayMap
clear, containsKey, containsValue, entrySet, keySet, size, values
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
HopscotchHashMap
public HopscotchHashMap(int initialCapacity)
-
-
Method Details