java.io.Externalizable
, java.io.Serializable
, DoubleIterable
, DoubleDoubleMap
, DoubleValuesMap
, MutableDoubleDoubleMap
, MutableDoubleValuesMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleDoubleHashMap extends AbstractMutableDoubleValuesMap implements MutableDoubleDoubleMap, java.io.Externalizable, MutableDoubleKeysMap
Constructor | Description |
---|---|
DoubleDoubleHashMap() |
|
DoubleDoubleHashMap(int initialCapacity) |
|
DoubleDoubleHashMap(DoubleDoubleMap map) |
Modifier and Type | Method | Description |
---|---|---|
double |
addToValue(double key,
double toBeAdded) |
|
MutableDoubleDoubleMap |
asSynchronized() |
|
MutableDoubleDoubleMap |
asUnmodifiable() |
|
void |
clear() |
|
void |
compact() |
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
containsKey(double key) |
|
MutableDoubleIterator |
doubleIterator() |
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an
imperative style.
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableDoubleDoubleMap |
flipUniqueValues() |
Return the DoubleDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleDoubleProcedure procedure) |
|
double |
get(double key) |
|
double |
getIfAbsent(double key,
double ifAbsent) |
|
double |
getIfAbsentPut(double key,
double value) |
|
double |
getIfAbsentPut(double key,
DoubleFunction0 function) |
|
<P> double |
getIfAbsentPutWith(double key,
DoubleFunction<? super P> function,
P parameter) |
|
double |
getIfAbsentPutWithKey(double key,
DoubleToDoubleFunction function) |
|
double |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectDoubleToObjectFunction<? super V,? extends V> function) |
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleDoublePair> |
keyValuesView() |
|
static DoubleDoubleHashMap |
newWithKeysValues(double key1,
double value1) |
|
static DoubleDoubleHashMap |
newWithKeysValues(double key1,
double value1,
double key2,
double value2) |
|
static DoubleDoubleHashMap |
newWithKeysValues(double key1,
double value1,
double key2,
double value2,
double key3,
double value3) |
|
static DoubleDoubleHashMap |
newWithKeysValues(double key1,
double value1,
double key2,
double value2,
double key3,
double value3,
double key4,
double value4) |
|
void |
put(double key,
double value) |
|
void |
putAll(DoubleDoubleMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
DoubleDoubleHashMap |
reject(DoubleDoublePredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
double |
removeKeyIfAbsent(double key,
double value) |
|
DoubleDoubleHashMap |
select(DoubleDoublePredicate predicate) |
|
ImmutableDoubleDoubleMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
double |
updateValue(double key,
double initialValueIfAbsent,
DoubleToDoubleFunction function) |
|
MutableDoubleCollection |
values() |
|
DoubleDoubleHashMap |
withKeysValues(double key1,
double value1,
double key2,
double value2) |
|
DoubleDoubleHashMap |
withKeysValues(double key1,
double value1,
double key2,
double value2,
double key3,
double value3) |
|
DoubleDoubleHashMap |
withKeysValues(double key1,
double value1,
double key2,
double value2,
double key3,
double value3,
double key4,
double value4) |
|
DoubleDoubleHashMap |
withKeyValue(double key1,
double value1) |
|
DoubleDoubleHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleDoubleHashMap |
withoutKey(double key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
isEmpty, notEmpty, size
containsValue, forEachValue, tap
putPair
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public DoubleDoubleHashMap()
public DoubleDoubleHashMap(int initialCapacity)
public DoubleDoubleHashMap(DoubleDoubleMap map)
public static DoubleDoubleHashMap newWithKeysValues(double key1, double value1)
public static DoubleDoubleHashMap newWithKeysValues(double key1, double value1, double key2, double value2)
public static DoubleDoubleHashMap newWithKeysValues(double key1, double value1, double key2, double value2, double key3, double value3)
public static DoubleDoubleHashMap newWithKeysValues(double key1, double value1, double key2, double value2, double key3, double value3, double key4, double value4)
public boolean equals(java.lang.Object obj)
DoubleDoubleMap
Map.equals(Object)
.equals
in interface DoubleDoubleMap
equals
in class java.lang.Object
public int hashCode()
DoubleDoubleMap
Map.hashCode()
.hashCode
in interface DoubleDoubleMap
hashCode
in class java.lang.Object
public java.lang.String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString()); Assert.assertEquals("[1]", IntLists.mutable.with(1).toString()); Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString
in interface DoubleDoubleMap
toString
in interface PrimitiveIterable
toString
in class AbstractDoubleIterable
AbstractCollection.toString()
public MutableDoubleIterator doubleIterator()
DoubleIterable
doubleIterator
in interface DoubleIterable
doubleIterator
in interface MutableDoubleValuesMap
public <V> V injectInto(V injectedValue, ObjectDoubleToObjectFunction<? super V,? extends V> function)
injectInto
in interface DoubleIterable
public void clear()
clear
in interface MutableDoubleKeysMap
clear
in interface MutableDoubleValuesMap
public void put(double key, double value)
put
in interface MutableDoubleDoubleMap
public void putAll(DoubleDoubleMap map)
putAll
in interface MutableDoubleDoubleMap
public void removeKey(double key)
removeKey
in interface MutableDoubleDoubleMap
removeKey
in interface MutableDoubleKeysMap
public void remove(double key)
remove
in interface MutableDoubleDoubleMap
public double removeKeyIfAbsent(double key, double value)
removeKeyIfAbsent
in interface MutableDoubleDoubleMap
public double getIfAbsentPut(double key, double value)
getIfAbsentPut
in interface MutableDoubleDoubleMap
public double getIfAbsentPut(double key, DoubleFunction0 function)
getIfAbsentPut
in interface MutableDoubleDoubleMap
public <P> double getIfAbsentPutWith(double key, DoubleFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleDoubleMap
public double getIfAbsentPutWithKey(double key, DoubleToDoubleFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleDoubleMap
public double addToValue(double key, double toBeAdded)
addToValue
in interface MutableDoubleDoubleMap
public double updateValue(double key, double initialValueIfAbsent, DoubleToDoubleFunction function)
updateValue
in interface MutableDoubleDoubleMap
public DoubleDoubleHashMap withKeyValue(double key1, double value1)
withKeyValue
in interface MutableDoubleDoubleMap
public DoubleDoubleHashMap withKeysValues(double key1, double value1, double key2, double value2)
public DoubleDoubleHashMap withKeysValues(double key1, double value1, double key2, double value2, double key3, double value3)
public DoubleDoubleHashMap withKeysValues(double key1, double value1, double key2, double value2, double key3, double value3, double key4, double value4)
public DoubleDoubleHashMap withoutKey(double key)
withoutKey
in interface MutableDoubleDoubleMap
public DoubleDoubleHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleDoubleMap
public MutableDoubleDoubleMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleDoubleMap
public MutableDoubleDoubleMap asSynchronized()
asSynchronized
in interface MutableDoubleDoubleMap
public ImmutableDoubleDoubleMap toImmutable()
toImmutable
in interface DoubleDoubleMap
public double get(double key)
get
in interface DoubleDoubleMap
public double getIfAbsent(double key, double ifAbsent)
getIfAbsent
in interface DoubleDoubleMap
public double getOrThrow(double key)
getOrThrow
in interface DoubleDoubleMap
public boolean containsKey(double key)
containsKey
in interface DoubleDoubleMap
containsKey
in interface DoubleKeysMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleDoubleMap
forEachKey
in interface DoubleKeysMap
public void forEachKeyValue(DoubleDoubleProcedure procedure)
forEachKeyValue
in interface DoubleDoubleMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleDoubleMap
public RichIterable<DoubleDoublePair> keyValuesView()
keyValuesView
in interface DoubleDoubleMap
public MutableDoubleDoubleMap flipUniqueValues()
DoubleDoubleMap
flipUniqueValues
in interface DoubleDoubleMap
flipUniqueValues
in interface MutableDoubleDoubleMap
public DoubleDoubleHashMap select(DoubleDoublePredicate predicate)
select
in interface DoubleDoubleMap
select
in interface MutableDoubleDoubleMap
public DoubleDoubleHashMap reject(DoubleDoublePredicate predicate)
reject
in interface DoubleDoubleMap
reject
in interface MutableDoubleDoubleMap
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void compact()
public MutableDoubleSet keySet()
keySet
in interface DoubleDoubleMap
public MutableDoubleCollection values()
values
in interface DoubleValuesMap
Copyright © 2004–2018. All rights reserved.