public static class Double2IntMaps.EmptyMap extends AbstractDouble2IntMap
AbstractDouble2IntMap.BasicEntryjava.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>Double2IntMap.BuilderCache, Double2IntMap.Entry, Double2IntMap.FastEntrySet, Double2IntMap.MapBuilder| Constructor and Description |
|---|
EmptyMap() |
| Modifier and Type | Method and Description |
|---|---|
int |
addTo(double key,
int value)
A Helper method to add a primitives together.
|
int |
computeInt(double key,
DoubleIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfAbsent(double key,
Double2IntFunction mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
int |
computeIntIfPresent(double key,
DoubleIntUnaryOperator mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
Double2IntMaps.EmptyMap |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Double2IntMap.Entry> |
double2IntEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
int |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
int |
getOrDefault(double key,
int defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
DoubleSet |
keySet() |
void |
mergeAllInt(Double2IntMap m,
IntIntUnaryOperator mappingFunction)
A Bulk method for merging Maps.
|
int |
mergeInt(double key,
int value,
IntIntUnaryOperator mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
int |
put(double key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
putIfAbsent(double key,
int value)
Type Specific method to reduce boxing/unboxing of values
|
int |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
int value)
Type Specific remove function to reduce boxing/unboxing
|
int |
removeOrDefault(double key,
int defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
int |
subFrom(double key,
int value)
A Helper method to subtract from primitive from each other.
|
int |
supplyIntIfAbsent(double key,
IntSupplier valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
IntCollection |
values() |
addToAll, containsKey, containsValue, entrySet, equals, forEach, get, getDefaultReturnValue, getOrDefault, hashCode, put, putAll, putAll, putAll, putAll, putAllIfAbsent, remove, replace, replace, replaceInts, replaceInts, setDefaultReturnValueclear, containsKey, containsValue, isEmpty, size, toStringbuilder, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, merge, putAll, putAll, putIfAbsent, remove, replace, replace, replaceAll, synchronize, synchronize, unmodifiableapplyAsIntpublic int put(double key,
int value)
Double2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)public int putIfAbsent(double key,
int value)
Double2IntMapkey - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)public int addTo(double key,
int value)
Double2IntMapkey - the key that should be inserted,value - the value that should be inserted / addedpublic int subFrom(double key,
int value)
Double2IntMapDouble2IntMap.getDefaultReturnValue()
If the fence is reached the element will be automaticall removedkey - that should be subtract fromvalue - that should be subtractpublic int remove(double key)
Double2IntMapkey - the element that should be removedpublic int removeOrDefault(double key,
int defaultValue)
Double2IntMapkey - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)public boolean remove(double key,
int value)
Double2IntMapkey - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)public int get(double key)
Double2IntMapkey - the key that is searched forpublic int getOrDefault(double key,
int defaultValue)
Double2IntMapgetOrDefault in interface Double2IntMapgetOrDefault in class AbstractDouble2IntMapkey - the key that is searched fordefaultValue - the value that should be returned if the key is not presentpublic int computeInt(double key,
DoubleIntUnaryOperator mappingFunction)
Double2IntMapcomputeInt in interface Double2IntMapcomputeInt in class AbstractDouble2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the valuepublic int computeIntIfAbsent(double key,
Double2IntFunction mappingFunction)
Double2IntMapcomputeIntIfAbsent in interface Double2IntMapcomputeIntIfAbsent in class AbstractDouble2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if not presentpublic int computeIntIfPresent(double key,
DoubleIntUnaryOperator mappingFunction)
Double2IntMapcomputeIntIfPresent in interface Double2IntMapcomputeIntIfPresent in class AbstractDouble2IntMapkey - the key that should be computedmappingFunction - the operator that should generate the value if presentpublic int supplyIntIfAbsent(double key,
IntSupplier valueProvider)
Double2IntMapsupplyIntIfAbsent in interface Double2IntMapsupplyIntIfAbsent in class AbstractDouble2IntMapkey - the key that should be computedvalueProvider - the value if not presentpublic int mergeInt(double key,
int value,
IntIntUnaryOperator mappingFunction)
Double2IntMapmergeInt in interface Double2IntMapmergeInt in class AbstractDouble2IntMapkey - 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(Double2IntMap m, IntIntUnaryOperator mappingFunction)
Double2IntMapmergeAllInt in interface Double2IntMapmergeAllInt in class AbstractDouble2IntMapm - the entries that should be bulk addedmappingFunction - the operator that should generate the new Valuepublic DoubleSet keySet()
keySet in interface java.util.Map<java.lang.Double,java.lang.Integer>keySet in interface Double2IntMapkeySet in class AbstractDouble2IntMappublic IntCollection values()
values in interface java.util.Map<java.lang.Double,java.lang.Integer>values in interface Double2IntMapvalues in class AbstractDouble2IntMappublic ObjectSet<Double2IntMap.Entry> double2IntEntrySet()
Double2IntMappublic Double2IntMaps.EmptyMap copy()
Double2IntMapcopy in interface Double2IntMapcopy in class AbstractDouble2IntMap