V - the keyType of elements maintained by this Collectionpublic static class Float2ObjectMaps.UnmodifyableMap<V> extends AbstractFloat2ObjectMap<V> implements Float2ObjectMap<V>
AbstractFloat2ObjectMap.BasicEntry<V>java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2ObjectMap.BuilderCache<V>, Float2ObjectMap.Entry<V>, Float2ObjectMap.FastEntrySet<V>, Float2ObjectMap.MapBuilder| 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,
FloatFunction<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
|
Float2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Float2ObjectMap.Entry<V>> |
float2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
V |
get(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 |
remove(float key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(float key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
V |
removeOrDefault(float key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
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
|
V |
supplyIfAbsent(float key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
ObjectCollection<V> |
values() |
containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, setDefaultReturnValueapply, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsKey, entrySet, forEach, forEach, get, getDefaultReturnValue, getOrDefault, merge, put, put, put, putAll, putAll, putAll, putAll, putAll, putAllIfAbsent, putIfAbsent, remove, remove, replace, replace, replace, replace, replaceAll, setDefaultReturnValue, synchronize, synchronize, unmodifiablepublic V put(float key, V value)
Float2ObjectMapput in interface Float2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public V putIfAbsent(float key, V value)
Float2ObjectMapputIfAbsent in interface Float2ObjectMap<V>key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public V remove(float key)
Float2ObjectMapremove in interface Float2ObjectMap<V>key - the element that should be removedpublic V removeOrDefault(float key, V defaultValue)
Float2ObjectMapremoveOrDefault in interface Float2ObjectMap<V>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(float key,
V value)
Float2ObjectMapremove in interface Float2ObjectMap<V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public V get(float key)
Float2ObjectMapget in interface Float2ObjectMap<V>key - the key that is searched forpublic 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 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, FloatFunction<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 supplyIfAbsent(float key, ObjectSupplier<V> valueProvider)
Float2ObjectMapsupplyIfAbsent in interface Float2ObjectMap<V>supplyIfAbsent in class AbstractFloat2ObjectMap<V>key - the key that should be computedvalueProvider - the value if not 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 void replaceObjects(FloatObjectUnaryOperator<V> mappingFunction)
Float2ObjectMapreplaceObjects in interface Float2ObjectMap<V>replaceObjects in class AbstractFloat2ObjectMap<V>mappingFunction - operation to replace all valuespublic void replaceObjects(Float2ObjectMap<V> m)
Float2ObjectMapreplaceObjects in interface Float2ObjectMap<V>replaceObjects in class AbstractFloat2ObjectMap<V>m - elements that should be replaced.public Float2ObjectMap<V> copy()
Float2ObjectMapcopy in interface Float2ObjectMap<V>copy in class AbstractFloat2ObjectMap<V>public void clear()
public 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 ObjectSet<Float2ObjectMap.Entry<V>> float2ObjectEntrySet()
Float2ObjectMapfloat2ObjectEntrySet in interface Float2ObjectMap<V>