public static class Float2IntMaps.SingletonMap extends AbstractFloat2IntMap
AbstractFloat2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2IntMap.BuilderCache, Float2IntMap.Entry, Float2IntMap.FastEntrySet, Float2IntMap.MapBuilder| Modifier and Type | Method and Description |
|---|---|
int |
addTo(float key,
int value)
A Helper method to add a primitives together.
|
int |
computeInt(float key,
FloatIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(float key,
Float2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(float key,
FloatIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Float2IntMaps.SingletonMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Float2IntMap.Entry> |
float2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
get(float key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(float key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
FloatSet |
keySet() |
void |
mergeAllInt(Float2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(float key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
int |
put(float key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(float key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(float key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(float key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(float key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
subFrom(float key,
int value)
A Helper method to subtract from primitive from each other.
|
int |
supplyIntIfAbsent(float key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
IntCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceInts, replaceInts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringapplyAsInt, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, put, put, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic int put(float key,
int value)
Float2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(float key,
int value)
Float2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(float key,
int value)
Float2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(float key,
int value)
Float2IntMapFloat2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic int remove(float key)
Float2IntMapkey - the element that should be removedpublic int removeOrDefault(float key,
int defaultValue)
Float2IntMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(float key,
int value)
Float2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int get(float key)
Float2IntMapkey - the key that is searched forpublic int getOrDefault(float key,
int defaultValue)
Float2IntMapgetOrDefault in interface Float2IntMapgetOrDefault in class AbstractFloat2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int computeInt(float key,
FloatIntUnaryOperator mappingFunction)
Float2IntMapcomputeInt in interface Float2IntMapcomputeInt in class AbstractFloat2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(float key,
Float2IntFunction mappingFunction)
Float2IntMapcomputeIntIfAbsent in interface Float2IntMapcomputeIntIfAbsent in class AbstractFloat2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int computeIntIfPresent(float key,
FloatIntUnaryOperator mappingFunction)
Float2IntMapcomputeIntIfPresent in interface Float2IntMapcomputeIntIfPresent in class AbstractFloat2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int supplyIntIfAbsent(float key,
IntSupplier valueProvider)
Float2IntMapsupplyIntIfAbsent in interface Float2IntMapsupplyIntIfAbsent in class AbstractFloat2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int mergeInt(float key,
int value,
IntIntUnaryOperator mappingFunction)
Float2IntMapmergeInt in interface Float2IntMapmergeInt in class AbstractFloat2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Float2IntMap m, IntIntUnaryOperator mappingFunction)
Float2IntMapmergeAllInt in interface Float2IntMapmergeAllInt in class AbstractFloat2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic Float2IntMaps.SingletonMap copy()
Float2IntMapcopy in interface Float2IntMapcopy in class AbstractFloat2IntMappublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,java.lang.Integer>keySet in interface Float2IntMapkeySet in class AbstractFloat2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Float,java.lang.Integer>values in interface Float2IntMapvalues in class AbstractFloat2IntMappublic ObjectSet<Float2IntMap.Entry> float2IntEntrySet()
Float2IntMap