Package org.apache.solr.util
Class IntIntDynamicMap
java.lang.Object
org.apache.solr.util.IntIntDynamicMap
- All Implemented Interfaces:
DynamicMap
-
Constructor Summary
ConstructorsConstructorDescriptionIntIntDynamicMap(int expectedKeyMax, int emptyValue) Create map with expected max value of key. -
Method Summary
Modifier and TypeMethodDescriptionvoidforEachValue(IntConsumer consumer) intget(int key) voidput(int key, int value) voidremove(int key) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.util.DynamicMap
mapExpectedElements, threshold, useArrayBased
-
Constructor Details
-
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 thanexpectedKeyMaxis discourage since it can leads to use LOT OF memory.
-
-
Method Details
-
put
public void put(int key, int value) -
get
public int get(int key) -
forEachValue
-
remove
public void remove(int key)
-