Package org.apache.solr.util
Class IntFloatDynamicMap
java.lang.Object
org.apache.solr.util.IntFloatDynamicMap
- All Implemented Interfaces:
DynamicMap
-
Constructor Summary
ConstructorsConstructorDescriptionIntFloatDynamicMap(int expectedKeyMax, float emptyValue) Create map with expected max value of key. -
Method Summary
Modifier and TypeMethodDescriptionvoidforEachValue(FloatConsumer consumer) floatget(int key) voidput(int key, float 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
-
IntFloatDynamicMap
public IntFloatDynamicMap(int expectedKeyMax, float 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, float value) -
get
public float get(int key) -
forEachValue
-
remove
public void remove(int key)
-