V - the type of elements maintained by this Collectionpublic interface Double2ObjectMap<V> extends java.util.Map<java.lang.Double,V>, Double2ObjectFunction<V>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Double2ObjectMap.BuilderCache<V>
Builder Cache for allowing to buildMaps
|
static interface |
Double2ObjectMap.Entry<V>
Type Specific Map Entry that reduces boxing/unboxing
|
static interface |
Double2ObjectMap.FastEntrySet<V>
Fast Entry set that allows for a faster Entry Iterator by recycling the Entry Object and just exchanging 1 internal value
|
static class |
Double2ObjectMap.MapBuilder
Helper class that reduces the method spam of the Map Class.
|
| Modifier and Type | Method and Description |
|---|---|
static Double2ObjectMap.MapBuilder |
builder()
Helper Class that allows to create Maps without requiring a to type out the entire implementation or know it.
|
default V |
compute(java.lang.Double key,
java.util.function.BiFunction<? super java.lang.Double,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
compute(double key,
DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
V |
computeIfAbsent(double key,
Double2ObjectFunction<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
default V |
computeIfAbsent(java.lang.Double key,
java.util.function.Function<? super java.lang.Double,? extends V> mappingFunction)
Deprecated.
|
default V |
computeIfPresent(java.lang.Double key,
java.util.function.BiFunction<? super java.lang.Double,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
computeIfPresent(double key,
DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific compute method to reduce boxing/unboxing
|
boolean |
containsKey(double key)
Type Specific method to reduce boxing/unboxing of values
|
default boolean |
containsKey(java.lang.Object key) |
Double2ObjectMap<V> |
copy()
A Function that does a shallow clone of the Map itself.
|
ObjectSet<Double2ObjectMap.Entry<V>> |
double2ObjectEntrySet()
Type Sensitive EntrySet to reduce boxing/unboxing and optionally Temp Object Allocation.
|
ObjectSet<java.util.Map.Entry<java.lang.Double,V>> |
entrySet()
Deprecated.
|
default void |
forEach(java.util.function.BiConsumer<? super java.lang.Double,? super V> action)
Deprecated.
|
void |
forEach(DoubleObjectConsumer<V> action)
Type Specific forEach method to reduce boxing/unboxing
|
V |
get(double key)
A Type Specific get method to reduce boxing/unboxing
|
default V |
get(java.lang.Object key)
Deprecated.
|
V |
getDefaultReturnValue()
Method to see what the default return value is.
|
V |
getOrDefault(double key,
V defaultValue)
A Type Specific getOrDefault method to reduce boxing/unboxing
|
default V |
getOrDefault(java.lang.Object key,
V defaultValue)
Deprecated.
|
DoubleSet |
keySet() |
default V |
merge(java.lang.Double key,
V value,
java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
Deprecated.
|
V |
merge(double key,
V value,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Type Specific merge method to reduce boxing/unboxing
|
void |
mergeAll(Double2ObjectMap<V> m,
ObjectObjectUnaryOperator<V,V> mappingFunction)
A Bulk method for merging Maps.
|
V |
put(double key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
default V |
put(java.lang.Double key,
V value)
Deprecated.
|
default void |
putAll(double[] keys,
V[] values)
Type Specific array method to bulk add elements into a map without creating a wrapper and increasing performances
|
default void |
putAll(java.lang.Double[] keys,
V[] values)
Type Specific Object array method to bulk add elements into a map without creating a wrapper and increasing performances
|
void |
putAll(double[] keys,
V[] 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.Double[] keys,
V[] 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(Double2ObjectMap<V> m)
Type Specific function for the bull putting of values
|
void |
putAllIfAbsent(Double2ObjectMap<V> m)
Type-Specific bulk put method put elements into the map if not present.
|
V |
putIfAbsent(double key,
V value)
Type Specific method to reduce boxing/unboxing of values
|
default V |
putIfAbsent(java.lang.Double key,
V value)
Deprecated.
|
V |
remove(double key)
Type Specific remove function to reduce boxing/unboxing
|
boolean |
remove(double key,
V value)
Type Specific remove function to reduce boxing/unboxing
|
default V |
remove(java.lang.Object key) |
default boolean |
remove(java.lang.Object key,
java.lang.Object value) |
V |
removeOrDefault(double key,
V defaultValue)
Type-Specific Remove function with a default return value if wanted.
|
V |
replace(double key,
V value)
A Type Specific replace method to reduce boxing/unboxing replace an existing value
|
default V |
replace(java.lang.Double key,
V value)
Deprecated.
|
boolean |
replace(double key,
V oldValue,
V newValue)
A Type Specific replace method to replace an existing value
|
default boolean |
replace(java.lang.Double key,
V oldValue,
V newValue)
Deprecated.
|
default void |
replaceAll(java.util.function.BiFunction<? super java.lang.Double,? super V,? extends V> mappingFunction)
Deprecated.
|
void |
replaceObjects(Double2ObjectMap<V> m)
Type-Specific bulk replace method.
|
void |
replaceObjects(DoubleObjectUnaryOperator<V> mappingFunction)
A Type Specific mass replace method to reduce boxing/unboxing
|
Double2ObjectMap<V> |
setDefaultReturnValue(V v)
Method to define the default return value if a requested key isn't present
|
V |
supplyIfAbsent(double key,
ObjectSupplier<V> valueProvider)
A Supplier based computeIfAbsent function to fill the most used usecase of this function
|
default Double2ObjectMap<V> |
synchronize()
Creates a Wrapped Map that is Synchronized
|
default Double2ObjectMap<V> |
synchronize(java.lang.Object mutex)
Creates a Wrapped Map that is Synchronized
|
default Double2ObjectMap<V> |
unmodifiable()
Creates a Wrapped Map that is unmodifiable
|
ObjectCollection<V> |
values() |
clear, containsValue, equals, hashCode, isEmpty, putAll, sizeapplystatic Double2ObjectMap.MapBuilder builder()
V getDefaultReturnValue()
Double2ObjectMap<V> setDefaultReturnValue(V v)
v - value that should be the default return valueDouble2ObjectMap<V> copy()
V put(double key, V value)
key - the key that should be inserted,value - the value that should be insertedMap.put(Object, Object)default void putAll(double[] keys,
V[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(double[] keys,
V[] values,
int offset,
int size)
keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)default void putAll(java.lang.Double[] keys,
V[] values)
keys - the keys that should be addedvalues - the values that should be addedjava.lang.IllegalStateException - if the arrays are not the same sizeMap.putAll(Map)void putAll(java.lang.Double[] keys,
V[] values,
int offset,
int size)
keys - the keys that should be addedvalues - the values that should be addedoffset - where the to start in the arraysize - how many elements should be addedjava.lang.IllegalStateException - if the arrays are not within the rangeMap.putAll(Map)V putIfAbsent(double key, V value)
key - the key that should be inserted,value - the value that should be insertedMap.putIfAbsent(Object, Object)void putAllIfAbsent(Double2ObjectMap<V> m)
m - elements that should be added if not present.void putAll(Double2ObjectMap<V> m)
m - the elements that should be insertedboolean containsKey(double key)
key - element that is searched fordefault boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.Double,V>key - that is searched for.Map.containsKey(Object)V remove(double key)
key - the element that should be removeddefault V remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.Double,V>key - the element that should be removedMap.remove(Object)boolean remove(double key,
V value)
key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)default boolean remove(java.lang.Object key,
java.lang.Object value)
remove in interface java.util.Map<java.lang.Double,V>key - the element that should be removedvalue - the expected value that should be foundMap.remove(Object, Object)V removeOrDefault(double key, V defaultValue)
key - the element that should be removeddefaultValue - the value that should be returned if the entry doesn't existMap.remove(Object, Object)boolean replace(double key,
V oldValue,
V newValue)
key - the element that should be searched foroldValue - the expected value to be replacednewValue - the value to replace the oldValue with.V replace(double key, V value)
key - the element that should be searched forvalue - the value to replace with.void replaceObjects(Double2ObjectMap<V> m)
m - elements that should be replaced.void replaceObjects(DoubleObjectUnaryOperator<V> mappingFunction)
mappingFunction - operation to replace all valuesV compute(double key, DoubleObjectUnaryOperator<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the valueV computeIfAbsent(double key, Double2ObjectFunction<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if not presentV supplyIfAbsent(double key, ObjectSupplier<V> valueProvider)
key - the key that should be computedvalueProvider - the value if not presentV computeIfPresent(double key, DoubleObjectUnaryOperator<V> mappingFunction)
key - the key that should be computedmappingFunction - the operator that should generate the value if presentV merge(double key, V value, ObjectObjectUnaryOperator<V,V> mappingFunction)
key - the key that should be be searched forvalue - the value that should be merged withmappingFunction - the operator that should generate the new Valuevoid mergeAll(Double2ObjectMap<V> m, ObjectObjectUnaryOperator<V,V> mappingFunction)
m - the entries that should be bulk addedmappingFunction - the operator that should generate the new Value@Deprecated
default boolean replace(java.lang.Double key,
V oldValue,
V newValue)
replace in interface java.util.Map<java.lang.Double,V>@Deprecated default V replace(java.lang.Double key, V value)
replace in interface java.util.Map<java.lang.Double,V>V get(double key)
get in interface Double2ObjectFunction<V>key - the key that is searched forV getOrDefault(double key, V defaultValue)
key - the key that is searched fordefaultValue - the value that should be returned if the key is not present@Deprecated default V get(java.lang.Object key)
get in interface java.util.Map<java.lang.Double,V>@Deprecated default V getOrDefault(java.lang.Object key, V defaultValue)
getOrDefault in interface java.util.Map<java.lang.Double,V>@Deprecated default void replaceAll(java.util.function.BiFunction<? super java.lang.Double,? super V,? extends V> mappingFunction)
replaceAll in interface java.util.Map<java.lang.Double,V>@Deprecated default V compute(java.lang.Double key, java.util.function.BiFunction<? super java.lang.Double,? super V,? extends V> mappingFunction)
compute in interface java.util.Map<java.lang.Double,V>@Deprecated default V computeIfAbsent(java.lang.Double key, java.util.function.Function<? super java.lang.Double,? extends V> mappingFunction)
computeIfAbsent in interface java.util.Map<java.lang.Double,V>@Deprecated default V computeIfPresent(java.lang.Double key, java.util.function.BiFunction<? super java.lang.Double,? super V,? extends V> mappingFunction)
computeIfPresent in interface java.util.Map<java.lang.Double,V>@Deprecated default V merge(java.lang.Double key, V value, java.util.function.BiFunction<? super V,? super V,? extends V> mappingFunction)
merge in interface java.util.Map<java.lang.Double,V>void forEach(DoubleObjectConsumer<V> action)
action - processor of the values that are iterator over@Deprecated default void forEach(java.util.function.BiConsumer<? super java.lang.Double,? super V> action)
forEach in interface java.util.Map<java.lang.Double,V>ObjectCollection<V> values()
values in interface java.util.Map<java.lang.Double,V>@Deprecated ObjectSet<java.util.Map.Entry<java.lang.Double,V>> entrySet()
entrySet in interface java.util.Map<java.lang.Double,V>ObjectSet<Double2ObjectMap.Entry<V>> double2ObjectEntrySet()
default Double2ObjectMap<V> synchronize()
Double2ObjectMaps.synchronize(speiger.src.collections.doubles.maps.interfaces.Double2ObjectMap<V>)default Double2ObjectMap<V> synchronize(java.lang.Object mutex)
mutex - is the controller of the synchronization blockDouble2ObjectMaps.synchronize(speiger.src.collections.doubles.maps.interfaces.Double2ObjectMap<V>)default Double2ObjectMap<V> unmodifiable()
Double2ObjectMaps.unmodifiable(speiger.src.collections.doubles.maps.interfaces.Double2ObjectMap<V>)@Deprecated default V put(java.lang.Double key, V value)
put in interface java.util.Map<java.lang.Double,V>