Package ognl
Class IntHashMap
java.lang.Object
ognl.IntHashMap
- All Implemented Interfaces:
Map
A Map that uses ints as the keys.
Use just like any java.util.Map, except that the keys must be ints. This is much faster than creating a new Integer for each access.
For non-Map access (faster) use the put(int, Object) method.
This class implements Map for convenience, but this is not the most efficient usage.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionIntHashMap(int initialCapacity) IntHashMap(int initialCapacity, float loadFactor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()final booleancontainsKey(int key) booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()final Objectget(int key) booleanisEmpty()keySet()final Objectvoidprotected voidrehash()final Objectremove(int key) 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
-
Constructor Details
-
IntHashMap
public IntHashMap(int initialCapacity, float loadFactor) -
IntHashMap
public IntHashMap(int initialCapacity) -
IntHashMap
public IntHashMap()
-
-
Method Details
-
rehash
protected void rehash() -
containsKey
public final boolean containsKey(int key) -
get
-
put
-
remove
-
size
public int size() -
isEmpty
public boolean isEmpty() -
get
-
put
-
putAll
-
remove
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap
-
containsValue
- Specified by:
containsValuein interfaceMap
-
keySet
-
values
-
entrySet
-