V - the type of elements maintained by this Collectionpublic class Float2ObjectOpenHashMap<V> extends AbstractFloat2ObjectMap<V>
AbstractFloat2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2ObjectMap.Entry<V>, Float2ObjectMap.FastEntrySet<V>| Constructor and Description |
|---|
Float2ObjectOpenHashMap()
Default Constructor
|
Float2ObjectOpenHashMap(float[] keys,
V[] values)
Helper constructor that allow to create a map from unboxed values
|
Float2ObjectOpenHashMap(java.lang.Float[] keys,
V[] values)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Float2ObjectOpenHashMap(float[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from unboxed values
|
Float2ObjectOpenHashMap(java.lang.Float[] keys,
V[] values,
float loadFactor)
Helper constructor that allow to create a map from boxed values (it will unbox them)
|
Float2ObjectOpenHashMap(Float2ObjectMap<V> map)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Float2ObjectOpenHashMap(Float2ObjectMap<V> map,
float loadFactor)
A Type Specific Helper function that allows to create a new Map with exactly the same values as the provided map.
|
Float2ObjectOpenHashMap(int minCapacity)
Constructor that defines the minimum capacity
|
Float2ObjectOpenHashMap(int minCapacity,
float loadFactor)
Constructor that defines the minimum capacity and load factor
|
Float2ObjectOpenHashMap(java.util.Map<? extends java.lang.Float,? extends V> map)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
Float2ObjectOpenHashMap(java.util.Map<? extends java.lang.Float,? extends V> map,
float loadFactor)
A Helper constructor that allows to create a Map with exactly the same values as the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
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 |
containsKey(java.lang.Object key)
Deprecated.
|
boolean |
containsValue(java.lang.Object value)
Deprecated.
|
ObjectSet<Float2ObjectMap.Entry<V>> |
float2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
void |
forEach(FloatObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(java.lang.Object key) |
V |
getObject(float key)
A Type Specific get method to reduce boxing/unboxing
|
V |
getOrDefault(float key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
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(float key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
putIfAbsent(float key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
V |
remFloat(float key)
Type Specific remove function to reduce boxing/unboxing
|
V |
remFloatOrDefault(float key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
boolean |
remove(float key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
remove(java.lang.Object key)
Deprecated.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
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
|
int |
size() |
ObjectCollection<V> |
values() |
entrySet, equals, getDefaultReturnValue, getOrDefault, hashCode, putAll, putAll, putAll, putAllIfAbsent, replaceObjects, replaceObjects, setDefaultReturnValuecompute, computeIfAbsent, computeIfPresent, forEach, merge, put, putAll, putIfAbsent, replace, replace, replaceAllpublic Float2ObjectOpenHashMap()
public Float2ObjectOpenHashMap(int minCapacity)
minCapacity - the minimum capacity the HashMap is allowed to be.java.lang.IllegalStateException - if the minimum capacity is negativepublic Float2ObjectOpenHashMap(int minCapacity,
float loadFactor)
minCapacity - the minimum capacity the HashMap is allowed to be.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the minimum capacity is negativejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Float2ObjectOpenHashMap(java.lang.Float[] keys,
V[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Float2ObjectOpenHashMap(java.lang.Float[] keys,
V[] values,
float loadFactor)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Float2ObjectOpenHashMap(float[] keys,
V[] values)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.java.lang.IllegalStateException - if the keys and values do not match in lenghtpublic Float2ObjectOpenHashMap(float[] keys,
V[] values,
float loadFactor)
keys - the keys that should be put into the mapvalues - the values that should be put into the map.loadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the keys and values do not match in lenghtjava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Float2ObjectOpenHashMap(java.util.Map<? extends java.lang.Float,? extends V> map)
map - the values that should be present in the mappublic Float2ObjectOpenHashMap(java.util.Map<? extends java.lang.Float,? extends V> map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public Float2ObjectOpenHashMap(Float2ObjectMap<V> map)
map - the values that should be present in the mappublic Float2ObjectOpenHashMap(Float2ObjectMap<V> map, float loadFactor)
map - the values that should be present in the maploadFactor - the percentage of how full the backing array can be before they resizejava.lang.IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1public V put(float key, V value)
Float2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(float key, V value)
Float2ObjectMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public boolean containsKey(float key)
Float2ObjectMapcontainsKey in interface Float2ObjectMap<V>containsKey in class AbstractFloat2ObjectMap<V>key - element that is searched for@Deprecated public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Float,V>containsKey in interface Float2ObjectMap<V>containsKey in class java.util.AbstractMap<java.lang.Float,V>key - that is searched for.Map.containsKey(Object)@Deprecated public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.Float,V>containsValue in class AbstractFloat2ObjectMap<V>public V remFloat(float key)
Float2ObjectMapkey - the element that should be removedpublic V remFloatOrDefault(float key, V defaultValue)
Float2ObjectMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)@Deprecated public 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 boolean remove(float key,
V value)
Float2ObjectMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public boolean remove(java.lang.Object key,
java.lang.Object value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V getObject(float key)
Float2ObjectMapkey - the key that is searched forpublic V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Float,V>get in interface Float2ObjectMap<V>get in class AbstractFloat2ObjectMap<V>public V getOrDefault(float key, V defaultValue)
Float2ObjectMapgetOrDefault in interface Float2ObjectMap<V>getOrDefault in class AbstractFloat2ObjectMap<V>key - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic ObjectSet<Float2ObjectMap.Entry<V>> float2ObjectEntrySet()
Float2ObjectMappublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,V>keySet in interface Float2ObjectMap<V>keySet in class AbstractFloat2ObjectMap<V>public ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Float,V>values in interface Float2ObjectMap<V>values in class AbstractFloat2ObjectMap<V>public void forEach(FloatObjectConsumer<V> action)
Float2ObjectMapforEach in interface Float2ObjectMap<V>forEach in class AbstractFloat2ObjectMap<V>action - processor of the values that are iterator overpublic boolean replace(float key,
V oldValue,
V newValue)
Float2ObjectMapreplace in interface Float2ObjectMap<V>replace in class AbstractFloat2ObjectMap<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>replace in class AbstractFloat2ObjectMap<V>key - the element that should be searched forvalue - the value to replace with.public V compute(float key, FloatObjectUnaryOperator<V> mappingFunction)
Float2ObjectMapcompute in interface Float2ObjectMap<V>compute in class AbstractFloat2ObjectMap<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>computeIfAbsent in class AbstractFloat2ObjectMap<V>key - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic V computeIfPresent(float key, FloatObjectUnaryOperator<V> mappingFunction)
Float2ObjectMapcomputeIfPresent in interface Float2ObjectMap<V>computeIfPresent in class AbstractFloat2ObjectMap<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>merge in class AbstractFloat2ObjectMap<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>mergeAll in class AbstractFloat2ObjectMap<V>m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic int size()