public final class IntDoubleMap extends AbstractMap<Integer,Double>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
IntDoubleMap() |
IntDoubleMap(int capacity) |
IntDoubleMap(int capacity,
float loadFactor) |
IntDoubleMap(Map<Integer,Double> collection) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(int key) |
boolean |
containsKey(Object key) |
Set<Map.Entry<Integer,Double>> |
entrySet() |
double |
get(int key)
Returns the value to which the specified key is mapped, or
Double.NaN if this map contains no mapping for the key. |
Double |
get(Object key) |
int[] |
getRawKeyTable() |
byte[] |
getRawStatusTable() |
double[] |
getRawValueTable() |
static int |
h(int key)
Returns a non-negative hash value
|
double |
increment(int key,
double delta) |
double |
put(int key,
double value) |
Double |
put(Integer key,
Double value) |
double |
remove(int key) |
Double |
remove(Object key) |
int |
size() |
clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public IntDoubleMap()
public IntDoubleMap(int capacity)
public IntDoubleMap(int capacity, float loadFactor)
public int size()
public int[] getRawKeyTable()
public double[] getRawValueTable()
public byte[] getRawStatusTable()
public double put(int key, double value)
public double increment(int key, double delta)
key
- the key whose associated value is to be incremented. All
non-present keys behave as having an implicit value of zero, in which
case the delta value is directly inserted into the map.delta
- the amount by which to increment the key's stored value.public double get(int key)
Double.NaN
if this map contains no mapping for the key.key
- the key whose associated value is to be returnedDouble.NaN
if this map contains no mapping for the keypublic double remove(int key)
key
- Double.NaN
if the
key was not present in the mappublic void clear()
public boolean containsKey(Object key)
containsKey
in interface Map<Integer,Double>
containsKey
in class AbstractMap<Integer,Double>
public boolean containsKey(int key)
public static int h(int key)
key
- Copyright © 2017. All rights reserved.