T - the type of elements maintained by this Collectionpublic abstract class AbstractObject2FloatMap<T> extends java.util.AbstractMap<T,java.lang.Float> implements Object2FloatMap<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractObject2FloatMap.BasicEntry<T>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Object2FloatMap.Entry<T>, Object2FloatMap.FastEntrySet<T>| Constructor and Description |
|---|
AbstractObject2FloatMap() |
| Modifier and Type | Method and Description |
|---|---|
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 |
containsKey(java.lang.Object key) |
boolean |
containsValue(float value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<T,java.lang.Float>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(ObjectFloatConsumer<T> action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Float |
get(java.lang.Object key) |
float |
getDefaultReturnValue()
Method to see what the default return value is.
|
java.lang.Float |
getOrDefault(java.lang.Object key,
java.lang.Float defaultValue) |
int |
hashCode() |
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
|
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 |
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
|
FloatCollection |
values() |
clear, containsValue, isEmpty, put, remove, size, toStringaddTo, compute, computeIfAbsent, computeIfPresent, containsValue, forEach, getFloat, getOrDefault, merge, object2FloatEntrySet, put, put, putAll, putIfAbsent, putIfAbsent, rem, remOrDefault, remove, remove, remove, replace, replace, replaceAllpublic float getDefaultReturnValue()
Object2FloatMapgetDefaultReturnValue in interface Object2FloatMap<T>public AbstractObject2FloatMap<T> setDefaultReturnValue(float v)
Object2FloatMapsetDefaultReturnValue in interface Object2FloatMap<T>v - value that should be the default return valuepublic void addToAll(Object2FloatMap<T> m)
Object2FloatMapaddToAll in interface Object2FloatMap<T>m - the values that should be added/insertedpublic void putAll(Object2FloatMap<T> m)
Object2FloatMapputAll in interface Object2FloatMap<T>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends T,? extends java.lang.Float> m)
public void putAll(T[] keys, float[] values, int offset, int size)
Object2FloatMapputAll in interface Object2FloatMap<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 void putAllIfAbsent(Object2FloatMap<T> m)
Object2FloatMapputAllIfAbsent in interface Object2FloatMap<T>m - elements that should be added if not present.public boolean containsKey(java.lang.Object key)
public boolean containsValue(float value)
Object2FloatMapcontainsValue in interface Object2FloatMap<T>value - element that is searched forpublic boolean replace(T key, float oldValue, float newValue)
Object2FloatMapreplace in interface Object2FloatMap<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>key - the element that should be searched forvalue - the value to replace with.public void replaceFloats(Object2FloatMap<T> m)
Object2FloatMapreplaceFloats in interface Object2FloatMap<T>m - elements that should be replaced.public void replaceFloats(ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapreplaceFloats in interface Object2FloatMap<T>mappingFunction - operation to replace all valuespublic float computeFloat(T key, ObjectFloatUnaryOperator<T> mappingFunction)
Object2FloatMapcomputeFloat in interface Object2FloatMap<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>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>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>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>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Float get(java.lang.Object key)
get in interface java.util.Map<T,java.lang.Float>get in interface Object2FloatMap<T>get in class java.util.AbstractMap<T,java.lang.Float>public java.lang.Float getOrDefault(java.lang.Object key,
java.lang.Float defaultValue)
getOrDefault in interface java.util.Map<T,java.lang.Float>getOrDefault in interface Object2FloatMap<T>public void forEach(ObjectFloatConsumer<T> action)
Object2FloatMapforEach in interface Object2FloatMap<T>action - processor of the values that are iterator overpublic ObjectSet<T> keySet()
keySet in interface java.util.Map<T,java.lang.Float>keySet in interface Object2FloatMap<T>keySet in class java.util.AbstractMap<T,java.lang.Float>public FloatCollection values()
values in interface java.util.Map<T,java.lang.Float>values in interface Object2FloatMap<T>values in class java.util.AbstractMap<T,java.lang.Float>public ObjectSet<java.util.Map.Entry<T,java.lang.Float>> entrySet()
entrySet in interface java.util.Map<T,java.lang.Float>entrySet in interface Object2FloatMap<T>entrySet in class java.util.AbstractMap<T,java.lang.Float>public boolean equals(java.lang.Object o)