Package io.deephaven.base
Class LowGarbageArrayIntegerMap<T>
- All Implemented Interfaces:
Serializable,Cloneable,Map<Integer,T>
A very simple
Map for small maps with Integer keys (uses direct array access) that creates no garbage (except
when expanding). This set only has one Iterator, which is reused. This set is not thread safe.
Note: This class extends HashMap rather than Map (or AbstractMap) only because one of the
fields where we want to use it (sun.nio.ch.EPollSelectorImpl#fdToKey) is (improperly) declared as a HashMap
rather than a Map.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.HashMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
LowGarbageArrayIntegerMap
public LowGarbageArrayIntegerMap()
-
-
Method Details
-
get
-
put
-
remove
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<Integer,T> - Overrides:
containsKeyin classHashMap<Integer,T>
-
putAll
-
clear
public void clear() -
containsValue
- Specified by:
containsValuein interfaceMap<Integer,T> - Overrides:
containsValuein classHashMap<Integer,T>
-
clone
-
keySet
-
values
-
entrySet
-