Package org.apache.solr.util
Class IntIntDynamicMap
- java.lang.Object
-
- org.apache.solr.util.IntIntDynamicMap
-
- All Implemented Interfaces:
DynamicMap
public class IntIntDynamicMap extends Object implements DynamicMap
-
-
Constructor Summary
Constructors Constructor Description IntIntDynamicMap(int expectedKeyMax, int emptyValue)
Create map with expected max value of key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forEachValue(IntConsumer consumer)
int
get(int key)
void
put(int key, int value)
void
remove(int key)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.util.DynamicMap
mapExpectedElements, threshold, useArrayBased
-
-
-
-
Constructor Detail
-
IntIntDynamicMap
public IntIntDynamicMap(int expectedKeyMax, int emptyValue)
Create map with expected max value of key. Although the map will automatically do resizing to be able to hold key>= expectedKeyMax
. But putting key much larger thanexpectedKeyMax
is discourage since it can leads to use LOT OF memory.
-
-
Method Detail
-
put
public void put(int key, int value)
-
get
public int get(int key)
-
forEachValue
public void forEachValue(IntConsumer consumer)
-
remove
public void remove(int key)
-
-