T - the type of elements maintained by this Collectionpublic static class Object2FloatMaps.SynchronizedMap<T> extends AbstractObject2FloatMap<T> implements Object2FloatMap<T>
AbstractObject2FloatMap.BasicEntry<T>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2FloatMap.Entry<T>, Object2FloatMap.FastEntrySet<T>| Modifier and Type | Method and Description |
|---|---|
float |
addTo(T key,
float value)
A Helper method to add a primitives together.
|
void |
addToAll(Object2FloatMap<T> m)
A Helper method to bulk add primitives together.
|
float |
computeFloat(T key,
ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfAbsent(T key,
Object2FloatFunction<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
float |
computeFloatIfPresent(T key,
ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
void |
forEach(ObjectFloatConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
float |
getDefaultReturnValue()
Method to see what the default return value is.
|
float |
getFloat(T key)
A Type Specific get method to reduce boxing/unboxing
|
float |
getOrDefault(T key,
float defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
ObjectSet<T> |
keySet() |
void |
mergeAllFloat(Object2FloatMap<T> m,
FloatFloatUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
float |
mergeFloat(T key,
float value,
FloatFloatUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
ObjectSet<Object2FloatMap.Entry<T>> |
object2FloatEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
float |
put(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
void |
putAll(java.util.Map<? extends T,? extends java.lang.Float> m) |
void |
putAll(Object2FloatMap<T> m)
Type Specific function for the bull putting of values
|
void |
putAll(T[] keys,
float[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAllIfAbsent(Object2FloatMap<T> m)
Type-Specific bulk put method put elements into the map if not present.
|
float |
putIfAbsent(T key,
float value)
Type Specific method to reduce boxing/unboxing of values
|
float |
rem(T key)
Type Specific remove function to reduce boxing/unboxing
|
float |
remOrDefault(T key,
float defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(T key,
float value)
Type Specific remove function to reduce boxing/unboxing
|
float |
replace(T key,
float value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(T key,
float oldValue,
float newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceFloats(Object2FloatMap<T> m)
Type-Specific bulk replace method.
|
void |
replaceFloats(ObjectFloatUnaryOperator<T> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractObject2FloatMap<T> |
setDefaultReturnValue(float v)
Method to define the default return value if a requested key isn't present
|
int |
size() |
FloatCollection |
values() |
containsKey, entrySet, equals, get, getOrDefault, hashCodeclear, containsValue, isEmpty, put, remove, toStringcompute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, get, getOrDefault, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAllpublic float getDefaultReturnValue()
Object2FloatMapgetDefaultReturnValue in interface Object2FloatMap<T>getDefaultReturnValue in class AbstractObject2FloatMap<T>public AbstractObject2FloatMap<T> setDefaultReturnValue(float v)
Object2FloatMapsetDefaultReturnValue in interface Object2FloatMap<T>setDefaultReturnValue in class AbstractObject2FloatMap<T>v - value that should be the default return valuepublic float put(T key, float value)
Object2FloatMapput in interface Object2FloatMap<T>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public float putIfAbsent(T key, float value)
Object2FloatMapputIfAbsent in interface Object2FloatMap<T>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public void putAllIfAbsent(Object2FloatMap<T> m)
Object2FloatMapputAllIfAbsent in interface Object2FloatMap<T>putAllIfAbsent in class AbstractObject2FloatMap<T>m - elements that should be added if not present.public float addTo(T key, float value)
Object2FloatMapaddTo in interface Object2FloatMap<T>key - the key that should be inserted,value - the value that should be inserted / addedpublic void addToAll(Object2FloatMap<T> m)
Object2FloatMapaddToAll in interface Object2FloatMap<T>addToAll in class AbstractObject2FloatMap<T>m - the values that should be added/insertedpublic void putAll(Object2FloatMap<T> m)
Object2FloatMapputAll in interface Object2FloatMap<T>putAll in class AbstractObject2FloatMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Float> m)
putAll in interface java.util.Map<T,java.lang.Float>putAll in class AbstractObject2FloatMap<T>public void putAll(T[] keys, float[] values, int offset, int size)
Object2FloatMapputAll in interface Object2FloatMap<T>putAll in class AbstractObject2FloatMap<T>keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedMap.putAll(Map)public boolean containsValue(float value)
Object2FloatMapcontainsValue in interface Object2FloatMap<T>containsValue in class AbstractObject2FloatMap<T>value - element that is searched forpublic float getFloat(T key)
Object2FloatMapgetFloat in interface Object2FloatFunction<T>getFloat in interface Object2FloatMap<T>key - the key that is searched forpublic float rem(T key)
Object2FloatMaprem in interface Object2FloatMap<T>key - the element that should be removedpublic float remOrDefault(T key, float defaultValue)
Object2FloatMapremOrDefault in interface Object2FloatMap<T>key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(T key, float value)
Object2FloatMapremove in interface Object2FloatMap<T>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean replace(T key, float oldValue, float newValue)
Object2FloatMapreplace in interface Object2FloatMap<T>replace in class AbstractObject2FloatMap<T>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public float replace(T key, float value)
Object2FloatMapreplace in interface Object2FloatMap<T>replace in class AbstractObject2FloatMap<T>key - the element that should be searched forvalue - the value to replace with.public void replaceFloats(Object2FloatMap<T> m)
Object2FloatMapreplaceFloats in interface Object2FloatMap<T>replaceFloats in class AbstractObject2FloatMap<T>m - elements that should be replaced.public void replaceFloats(ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapreplaceFloats in interface Object2FloatMap<T>replaceFloats in class AbstractObject2FloatMap<T>mappingFunction - operation to replace all valuespublic float computeFloat(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloat in interface Object2FloatMap<T>computeFloat in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic float computeFloatIfAbsent(T key, Object2FloatFunction<T> mappingFunction)
Object2FloatMapcomputeFloatIfAbsent in interface Object2FloatMap<T>computeFloatIfAbsent in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic float computeFloatIfPresent(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloatIfPresent in interface Object2FloatMap<T>computeFloatIfPresent in class AbstractObject2FloatMap<T>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic float mergeFloat(T key, float value, FloatFloatUnaryOperator mappingFunction)
Object2FloatMapmergeFloat in interface Object2FloatMap<T>mergeFloat in class AbstractObject2FloatMap<T>key - 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(Object2FloatMap<T> m, FloatFloatUnaryOperator mappingFunction)
Object2FloatMapmergeAllFloat in interface Object2FloatMap<T>mergeAllFloat in class AbstractObject2FloatMap<T>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic float getOrDefault(T key, float defaultValue)
Object2FloatMapgetOrDefault in interface Object2FloatMap<T>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(ObjectFloatConsumer<T> action)
Object2FloatMapforEach in interface Object2FloatMap<T>forEach in class AbstractObject2FloatMap<T>action - processor of the values that are iterator overpublic int size()
public ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Float>keySet in interface Object2FloatMap<T>keySet in class AbstractObject2FloatMap<T>public FloatCollection values()
values in interface java.util.Map<T,java.lang.Float>values in interface Object2FloatMap<T>values in class AbstractObject2FloatMap<T>public ObjectSet<Object2FloatMap.Entry<T>> object2FloatEntrySet()
Object2FloatMapobject2FloatEntrySet in interface Object2FloatMap<T>