public static class Int2FloatMaps.UnmodifyableMap extends AbstractInt2FloatMap implements Int2FloatMap
AbstractInt2FloatMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Int2FloatMap.BuilderCache, Int2FloatMap.Entry, Int2FloatMap.FastEntrySet, Int2FloatMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
float |
addTo(int key,
float value)
A Helper method to add a primitives together.
|
void |
clear() |
float |
computeFloat(int key,
IntFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(int key,
Int2FloatFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(int key,
IntFloatUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Int2FloatMap |
copy()
A Function that does a shallow clone of the Map itself.
|
float |
get(int key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(int key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<Int2FloatMap.Entry> |
int2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
IntSet |
keySet() |
void |
mergeAllFloat(Int2FloatMap m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(int key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
float |
put(int key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
putIfAbsent(int key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
remove(int key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(int key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
removeOrDefault(int key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
void |
replaceFloats(Int2FloatMap m)
Type-Specific bulk replace method.
|
void |
replaceFloats(IntFloatUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
float |
subFrom(int key,
float value)
A Helper method to subtract from primitive from each other.
|
float |
supplyFloatIfAbsent(int key,
FloatSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
FloatCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValuecontainsKey, containsValue, isEmpty, size, toStringaddToAll, applyAsFloat, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, containsValue, containsValue, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic float put(int key,
float value)
Int2FloatMapput in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(int key,
float value)
Int2FloatMapputIfAbsent in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public float addTo(int key,
float value)
Int2FloatMapaddTo in interface Int2FloatMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic float subFrom(int key,
float value)
Int2FloatMapInt2FloatMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedsubFrom in interface Int2FloatMapkey - that should be subtract fromvalue - that should be subtractpublic float remove(int key)
Int2FloatMapremove in interface Int2FloatMapkey - the element that should be removedpublic float removeOrDefault(int key,
float defaultValue)
Int2FloatMapremoveOrDefault in interface Int2FloatMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(int key,
float value)
Int2FloatMapremove in interface Int2FloatMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public float get(int key)
Int2FloatMapget in interface Int2FloatMapkey - the key that is searched forpublic float getOrDefault(int key,
float defaultValue)
Int2FloatMapgetOrDefault in interface Int2FloatMapgetOrDefault in class AbstractInt2FloatMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic float computeFloat(int key,
IntFloatUnaryOperator mappingFunction)
Int2FloatMapcomputeFloat in interface Int2FloatMapcomputeFloat in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(int key,
Int2FloatFunction mappingFunction)
Int2FloatMapcomputeFloatIfAbsent in interface Int2FloatMapcomputeFloatIfAbsent in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(int key,
IntFloatUnaryOperator mappingFunction)
Int2FloatMapcomputeFloatIfPresent in interface Int2FloatMapcomputeFloatIfPresent in class AbstractInt2FloatMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float supplyFloatIfAbsent(int key,
FloatSupplier valueProvider)
Int2FloatMapsupplyFloatIfAbsent in interface Int2FloatMapsupplyFloatIfAbsent in class AbstractInt2FloatMapkey - the key that should be computedvalueProvider - the value if not presentpublic float mergeFloat(int key,
float value,
FloatFloatUnaryOperator mappingFunction)
Int2FloatMapmergeFloat in interface Int2FloatMapmergeFloat in class AbstractInt2FloatMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllFloat(Int2FloatMap m, FloatFloatUnaryOperator mappingFunction)
Int2FloatMapmergeAllFloat in interface Int2FloatMapmergeAllFloat in class AbstractInt2FloatMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic void replaceFloats(IntFloatUnaryOperator mappingFunction)
Int2FloatMapreplaceFloats in interface Int2FloatMapreplaceFloats in class AbstractInt2FloatMapmappingFunction - operation to replace all valuespublic void replaceFloats(Int2FloatMap m)
Int2FloatMapreplaceFloats in interface Int2FloatMapreplaceFloats in class AbstractInt2FloatMapm - elements that should be replaced.public Int2FloatMap copy()
Int2FloatMapcopy in interface Int2FloatMapcopy in class AbstractInt2FloatMappublic void clear()
clear in interface java.util.Map<java.lang.Integer,java.lang.Float>clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Float>public IntSet keySet()
keySet in interface java.util.Map<java.lang.Integer,java.lang.Float>keySet in interface Int2FloatMapkeySet in class AbstractInt2FloatMappublic FloatCollection values()
values in interface java.util.Map<java.lang.Integer,java.lang.Float>values in interface Int2FloatMapvalues in class AbstractInt2FloatMappublic ObjectSet<Int2FloatMap.Entry> int2FloatEntrySet()
Int2FloatMapint2FloatEntrySet in interface Int2FloatMap