public abstract class AbstractFloat2IntMap extends java.util.AbstractMap<java.lang.Float,java.lang.Integer> implements Float2IntMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFloat2IntMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2IntMap.Entry, Float2IntMap.FastEntrySet| Constructor and Description |
|---|
AbstractFloat2IntMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Float2IntMap m)
A Helper method to bulk add primitives together.
|
int |
computeInt(float key,
FloatIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(float key,
Float2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(float key,
FloatIntUnaryOperator 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(int value)
Type Specific method to reduce boxing/unboxing of values
|
ObjectSet<java.util.Map.Entry<java.lang.Float,java.lang.Integer>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(FloatIntConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Integer |
get(java.lang.Object key) |
int |
getDefaultReturnValue()
Method to see what the default return value is.
|
int |
getOrDefault(float key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Integer |
getOrDefault(java.lang.Object key,
java.lang.Integer defaultValue) |
int |
hashCode() |
FloatSet |
keySet() |
void |
mergeAllInt(Float2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(float key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
putAll(float[] keys,
int[] 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(Float2IntMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Float,? extends java.lang.Integer> m) |
void |
putAllIfAbsent(Float2IntMap m)
Type-Specific bulk put method put elements into the map if not present.
|
int |
replace(float key,
int value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(float key,
int oldValue,
int newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceInts(Float2IntMap m)
Type-Specific bulk replace method.
|
void |
replaceInts(FloatIntUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractFloat2IntMap |
setDefaultReturnValue(int v)
Method to define the default return value if a requested key isn't present
|
IntCollection |
values() |
clear, containsKey, containsValue, isEmpty, put, remove, size, toStringaddTo, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, float2IntEntrySet, forEach, getInt, merge, put, put, putAll, putIfAbsent, putIfAbsent, remFloat, remFloatOrDefault, remove, remove, remove, replace, replace, replaceAllpublic int getDefaultReturnValue()
Float2IntMapgetDefaultReturnValue in interface Float2IntMappublic AbstractFloat2IntMap setDefaultReturnValue(int v)
Float2IntMapsetDefaultReturnValue in interface Float2IntMapv - value that should be the default return valuepublic void addToAll(Float2IntMap m)
Float2IntMapaddToAll in interface Float2IntMapm - the values that should be added/insertedpublic void putAll(Float2IntMap m)
Float2IntMapputAll in interface Float2IntMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Float,? extends java.lang.Integer> m)
putAll in interface java.util.Map<java.lang.Float,java.lang.Integer>putAll in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public void putAll(float[] keys,
int[] values,
int offset,
int size)
Float2IntMapputAll in interface Float2IntMapkeys - 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(Float2IntMap m)
Float2IntMapputAllIfAbsent in interface Float2IntMapm - elements that should be added if not present.public boolean containsKey(float key)
Float2IntMapcontainsKey in interface Float2IntMapkey - element that is searched forpublic boolean containsValue(int value)
Float2IntMapcontainsValue in interface Float2IntMapvalue - element that is searched forpublic boolean replace(float key,
int oldValue,
int newValue)
Float2IntMapreplace in interface Float2IntMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public int replace(float key,
int value)
Float2IntMapreplace in interface Float2IntMapkey - the element that should be searched forvalue - the value to replace with.public void replaceInts(Float2IntMap m)
Float2IntMapreplaceInts in interface Float2IntMapm - elements that should be replaced.public void replaceInts(FloatIntUnaryOperator mappingFunction)
Float2IntMapreplaceInts in interface Float2IntMapmappingFunction - operation to replace all valuespublic int computeInt(float key,
FloatIntUnaryOperator mappingFunction)
Float2IntMapcomputeInt in interface Float2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(float key,
Float2IntFunction mappingFunction)
Float2IntMapcomputeIntIfAbsent in interface Float2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int computeIntIfPresent(float key,
FloatIntUnaryOperator mappingFunction)
Float2IntMapcomputeIntIfPresent in interface Float2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int mergeInt(float key,
int value,
IntIntUnaryOperator mappingFunction)
Float2IntMapmergeInt in interface Float2IntMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllInt(Float2IntMap m, IntIntUnaryOperator mappingFunction)
Float2IntMapmergeAllInt in interface Float2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Integer get(java.lang.Object key)
get in interface java.util.Map<java.lang.Float,java.lang.Integer>get in interface Float2IntMapget in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public java.lang.Integer getOrDefault(java.lang.Object key,
java.lang.Integer defaultValue)
getOrDefault in interface java.util.Map<java.lang.Float,java.lang.Integer>getOrDefault in interface Float2IntMappublic int getOrDefault(float key,
int defaultValue)
Float2IntMapgetOrDefault in interface Float2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic void forEach(FloatIntConsumer action)
Float2IntMapforEach in interface Float2IntMapaction - processor of the values that are iterator overpublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,java.lang.Integer>keySet in interface Float2IntMapkeySet in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public IntCollection values()
values in interface java.util.Map<java.lang.Float,java.lang.Integer>values in interface Float2IntMapvalues in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public ObjectSet<java.util.Map.Entry<java.lang.Float,java.lang.Integer>> entrySet()
entrySet in interface java.util.Map<java.lang.Float,java.lang.Integer>entrySet in interface Float2IntMapentrySet in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Float,java.lang.Integer>equals in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>public int hashCode()
hashCode in interface java.util.Map<java.lang.Float,java.lang.Integer>hashCode in class java.util.AbstractMap<java.lang.Float,java.lang.Integer>