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 TypeMethodDescriptionvoid
clear()
final boolean
containsKey
(int key) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
final Object
get
(int key) boolean
isEmpty()
keySet()
final Object
void
protected void
rehash()
final Object
remove
(int key) 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
-
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:
containsKey
in interfaceMap
-
containsValue
- Specified by:
containsValue
in interfaceMap
-
keySet
-
values
-
entrySet
-