V - the type of elements maintained by this Collectionpublic abstract class AbstractFloat2ObjectMap<V> extends java.util.AbstractMap<java.lang.Float,V> implements Float2ObjectMap<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFloat2ObjectMap.BasicEntry<V>
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2ObjectMap.BuilderCache<V>, Float2ObjectMap.Entry<V>, Float2ObjectMap.FastEntrySet<V>, Float2ObjectMap.MapBuilder| Constructor and Description |
|---|
AbstractFloat2ObjectMap() |
| Modifier and Type | Method and Description |
|---|---|
V |
compute(float key,
FloatObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(float key,
Float2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfPresent(float key,
FloatObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(float key)
Type Specific method to reduce boxing/unboxing of values
|
boolean |
containsValue(java.lang.Object value) |
Float2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Float,V>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(FloatObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(float key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
V |
getOrDefault(java.lang.Object key,
V defaultValue) |
int |
hashCode() |
FloatSet |
keySet() |
V |
merge(float key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Float2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(java.lang.Float key,
V value)
Deprecated.
|
void |
putAll(float[] keys,
V[] values,
int offset,
int size)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(java.lang.Float[] keys,
V[] values,
int offset,
int size)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(Float2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Float,? extends V> m) |
void |
putAllIfAbsent(Float2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
remove(java.lang.Object key) |
V |
replace(float key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(float key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceObjects(Float2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(FloatObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractFloat2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(float key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
builder, compute, computeIfAbsent, computeIfPresent, containsKey, float2ObjectEntrySet, forEach, get, merge, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, synchronize, synchronize, unmodifiablepublic V getDefaultReturnValue()
Float2ObjectMapgetDefaultReturnValue in interface Float2ObjectMap<V>public AbstractFloat2ObjectMap<V> setDefaultReturnValue(V v)
Float2ObjectMapsetDefaultReturnValue in interface Float2ObjectMap<V>v - value that should be the default return valuepublic Float2ObjectMap<V> copy()
Float2ObjectMapcopy in interface Float2ObjectMap<V>@Deprecated public V put(java.lang.Float key, V value)
put in interface java.util.Map<java.lang.Float,V>put in interface Float2ObjectMap<V>put in class java.util.AbstractMap<java.lang.Float,V>public void putAll(Float2ObjectMap<V> m)
Float2ObjectMapputAll in interface Float2ObjectMap<V>m - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Float,? extends V> m)
public void putAll(float[] keys,
V[] values,
int offset,
int size)
Float2ObjectMapputAll in interface Float2ObjectMap<V>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 putAll(java.lang.Float[] keys,
V[] values,
int offset,
int size)
Float2ObjectMapputAll in interface Float2ObjectMap<V>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(Float2ObjectMap<V> m)
Float2ObjectMapputAllIfAbsent in interface Float2ObjectMap<V>m - elements that should be added if not present.public boolean containsKey(float key)
Float2ObjectMapcontainsKey in interface Float2ObjectMap<V>key - element that is searched forpublic boolean containsValue(java.lang.Object value)
public boolean replace(float key,
V oldValue,
V newValue)
Float2ObjectMapreplace in interface Float2ObjectMap<V>key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public V replace(float key, V value)
Float2ObjectMapreplace in interface Float2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public void replaceObjects(Float2ObjectMap<V> m)
Float2ObjectMapreplaceObjects in interface Float2ObjectMap<V>m - elements that should be replaced.public void replaceObjects(FloatObjectUnaryOperator<V> mappingFunction)
Float2ObjectMapreplaceObjects in interface Float2ObjectMap<V>mappingFunction - operation to replace all valuespublic V compute(float key, FloatObjectUnaryOperator<V> mappingFunction)
Float2ObjectMapcompute in interface Float2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the valuepublic V computeIfAbsent(float key, Float2ObjectFunction<V> mappingFunction)
Float2ObjectMapcomputeIfAbsent in interface Float2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V supplyIfAbsent(float key, ObjectSupplier<V> valueProvider)
Float2ObjectMapsupplyIfAbsent in interface Float2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not presentpublic V computeIfPresent(float key, FloatObjectUnaryOperator<V> mappingFunction)
Float2ObjectMapcomputeIfPresent in interface Float2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic V merge(float key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
Float2ObjectMapmerge in interface Float2ObjectMap<V>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 mergeAll(Float2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
Float2ObjectMapmergeAll in interface Float2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Float,V>get in interface Float2ObjectMap<V>get in class java.util.AbstractMap<java.lang.Float,V>public V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Float,V>getOrDefault in interface Float2ObjectMap<V>public V getOrDefault(float key, V defaultValue)
Float2ObjectMapgetOrDefault in interface Float2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Float,V>remove in interface Float2ObjectMap<V>remove in class java.util.AbstractMap<java.lang.Float,V>key - the element that should be removedMap.remove(Object)public void forEach(FloatObjectConsumer<V> action)
Float2ObjectMapforEach in interface Float2ObjectMap<V>action - processor of the values that are iterator overpublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,V>keySet in interface Float2ObjectMap<V>keySet in class java.util.AbstractMap<java.lang.Float,V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Float,V>values in interface Float2ObjectMap<V>values in class java.util.AbstractMap<java.lang.Float,V>public ObjectSet<java.util.Map.Entry<java.lang.Float,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Float,V>entrySet in interface Float2ObjectMap<V>entrySet in class java.util.AbstractMap<java.lang.Float,V>public boolean equals(java.lang.Object o)