public abstract class AbstractFloat2LongMap extends java.util.AbstractMap<java.lang.Float,java.lang.Long> implements Float2LongMap
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFloat2LongMap.BasicEntry
A Simple Type Specific Entry class to reduce boxing/unboxing
|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Float2LongMap.BuilderCache, Float2LongMap.Entry, Float2LongMap.FastEntrySet, Float2LongMap.MapBuilder| Constructor and Description |
|---|
AbstractFloat2LongMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAll(Float2LongMap m)
A Helper method to bulk add primitives together.
|
long |
computeLong(float key,
FloatLongUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfAbsent(float key,
Float2LongFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
long |
computeLongIfPresent(float key,
FloatLongUnaryOperator 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(long value)
Type Specific method to reduce boxing/unboxing of values
|
Float2LongMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<java.util.Map.Entry<java.lang.Float,java.lang.Long>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
void |
forEach(FloatLongConsumer action)
Type Specific forEach method to reduce boxing/unboxing
|
java.lang.Long |
get(java.lang.Object key) |
long |
getDefaultReturnValue()
Method to see what the default return value is.
|
long |
getOrDefault(float key,
long defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
java.lang.Long |
getOrDefault(java.lang.Object key,
java.lang.Long defaultValue) |
int |
hashCode() |
FloatSet |
keySet() |
void |
mergeAllLong(Float2LongMap m,
LongLongUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
long |
mergeLong(float key,
long value,
LongLongUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
java.lang.Long |
put(java.lang.Float key,
java.lang.Long value)
Deprecated.
|
void |
putAll(float[] keys,
long[] 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,
java.lang.Long[] 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(Float2LongMap m)
Type Specific function for the bull putting of values
|
void |
putAll(java.util.Map<? extends java.lang.Float,? extends java.lang.Long> m) |
void |
putAllIfAbsent(Float2LongMap m)
Type-Specific bulk put method put elements into the map if not present.
|
java.lang.Long |
remove(java.lang.Object key) |
long |
replace(float key,
long value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
boolean |
replace(float key,
long oldValue,
long newValue)
A Type Specific replace method to replace an existing value
|
void |
replaceLongs(Float2LongMap m)
Type-Specific bulk replace method.
|
void |
replaceLongs(FloatLongUnaryOperator mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
AbstractFloat2LongMap |
setDefaultReturnValue(long v)
Method to define the default return value if a requested key isn't present
|
long |
supplyLongIfAbsent(float key,
LongSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
LongCollection |
values() |
clear, containsKey, containsValue, isEmpty, size, toStringaddTo, builder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, float2LongEntrySet, forEach, get, merge, put, putAll, putAll, putIfAbsent, putIfAbsent, remove, remove, remove, removeOrDefault, replace, replace, replaceAll, subFrom, synchronize, synchronize, unmodifiablepublic long getDefaultReturnValue()
Float2LongMapgetDefaultReturnValue in interface Float2LongMappublic AbstractFloat2LongMap setDefaultReturnValue(long v)
Float2LongMapsetDefaultReturnValue in interface Float2LongMapv - value that should be the default return valuepublic Float2LongMap copy()
Float2LongMapcopy in interface Float2LongMap@Deprecated
public java.lang.Long put(java.lang.Float key,
java.lang.Long value)
put in interface java.util.Map<java.lang.Float,java.lang.Long>put in interface Float2LongMapput in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public void addToAll(Float2LongMap m)
Float2LongMapaddToAll in interface Float2LongMapm - the values that should be added/insertedpublic void putAll(Float2LongMap m)
Float2LongMapputAll in interface Float2LongMapm - the elements that should be insertedpublic void putAll(java.util.Map<? extends java.lang.Float,? extends java.lang.Long> m)
putAll in interface java.util.Map<java.lang.Float,java.lang.Long>putAll in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public void putAll(float[] keys,
long[] values,
int offset,
int size)
Float2LongMapputAll in interface Float2LongMapkeys - 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,
java.lang.Long[] values,
int offset,
int size)
Float2LongMapputAll in interface Float2LongMapkeys - 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(Float2LongMap m)
Float2LongMapputAllIfAbsent in interface Float2LongMapm - elements that should be added if not present.public boolean containsKey(float key)
Float2LongMapcontainsKey in interface Float2LongMapkey - element that is searched forpublic boolean containsValue(long value)
Float2LongMapcontainsValue in interface Float2LongMapvalue - element that is searched forpublic boolean replace(float key,
long oldValue,
long newValue)
Float2LongMapreplace in interface Float2LongMapkey - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.public long replace(float key,
long value)
Float2LongMapreplace in interface Float2LongMapkey - the element that should be searched forvalue - the value to replace with.public void replaceLongs(Float2LongMap m)
Float2LongMapreplaceLongs in interface Float2LongMapm - elements that should be replaced.public void replaceLongs(FloatLongUnaryOperator mappingFunction)
Float2LongMapreplaceLongs in interface Float2LongMapmappingFunction - operation to replace all valuespublic long computeLong(float key,
FloatLongUnaryOperator mappingFunction)
Float2LongMapcomputeLong in interface Float2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic long computeLongIfAbsent(float key,
Float2LongFunction mappingFunction)
Float2LongMapcomputeLongIfAbsent in interface Float2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic long supplyLongIfAbsent(float key,
LongSupplier valueProvider)
Float2LongMapsupplyLongIfAbsent in interface Float2LongMapkey - the key that should be computedvalueProvider - the value if not presentpublic long computeLongIfPresent(float key,
FloatLongUnaryOperator mappingFunction)
Float2LongMapcomputeLongIfPresent in interface Float2LongMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic long mergeLong(float key,
long value,
LongLongUnaryOperator mappingFunction)
Float2LongMapmergeLong in interface Float2LongMapkey - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuepublic void mergeAllLong(Float2LongMap m, LongLongUnaryOperator mappingFunction)
Float2LongMapmergeAllLong in interface Float2LongMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic java.lang.Long get(java.lang.Object key)
get in interface java.util.Map<java.lang.Float,java.lang.Long>get in interface Float2LongMapget in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public java.lang.Long getOrDefault(java.lang.Object key,
java.lang.Long defaultValue)
getOrDefault in interface java.util.Map<java.lang.Float,java.lang.Long>getOrDefault in interface Float2LongMappublic long getOrDefault(float key,
long defaultValue)
Float2LongMapgetOrDefault in interface Float2LongMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic java.lang.Long remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Float,java.lang.Long>remove in interface Float2LongMapremove in class java.util.AbstractMap<java.lang.Float,java.lang.Long>key - the element that should be removedMap.remove(Object)public void forEach(FloatLongConsumer action)
Float2LongMapforEach in interface Float2LongMapaction - processor of the values that are iterator overpublic FloatSet keySet()
keySet in interface java.util.Map<java.lang.Float,java.lang.Long>keySet in interface Float2LongMapkeySet in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public LongCollection values()
values in interface java.util.Map<java.lang.Float,java.lang.Long>values in interface Float2LongMapvalues in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public ObjectSet<java.util.Map.Entry<java.lang.Float,java.lang.Long>> entrySet()
entrySet in interface java.util.Map<java.lang.Float,java.lang.Long>entrySet in interface Float2LongMapentrySet in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.Float,java.lang.Long>equals in class java.util.AbstractMap<java.lang.Float,java.lang.Long>public int hashCode()
hashCode in interface java.util.Map<java.lang.Float,java.lang.Long>hashCode in class java.util.AbstractMap<java.lang.Float,java.lang.Long>