java.io.Externalizable, java.io.Serializable, IntIterable, DoubleIntMap, IntValuesMap, MutableDoubleIntMap, MutableIntValuesMap, PrimitiveIterable, MutableDoubleKeysMap, DoubleKeysMappublic class DoubleIntHashMap extends AbstractMutableIntValuesMap implements MutableDoubleIntMap, java.io.Externalizable, MutableDoubleKeysMap
| Constructor | Description |
|---|---|
DoubleIntHashMap() |
|
DoubleIntHashMap(int initialCapacity) |
|
DoubleIntHashMap(DoubleIntMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
addToValue(double key,
int toBeAdded) |
|
MutableDoubleIntMap |
asSynchronized() |
|
MutableDoubleIntMap |
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) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableIntDoubleMap |
flipUniqueValues() |
Return the IntDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleIntProcedure procedure) |
|
int |
get(double key) |
|
int |
getIfAbsent(double key,
int ifAbsent) |
|
int |
getIfAbsentPut(double key,
int value) |
|
int |
getIfAbsentPut(double key,
IntFunction0 function) |
|
<P> int |
getIfAbsentPutWith(double key,
IntFunction<? super P> function,
P parameter) |
|
int |
getIfAbsentPutWithKey(double key,
DoubleToIntFunction function) |
|
int |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
|
MutableIntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleIntPair> |
keyValuesView() |
|
static DoubleIntHashMap |
newWithKeysValues(double key1,
int value1) |
|
static DoubleIntHashMap |
newWithKeysValues(double key1,
int value1,
double key2,
int value2) |
|
static DoubleIntHashMap |
newWithKeysValues(double key1,
int value1,
double key2,
int value2,
double key3,
int value3) |
|
static DoubleIntHashMap |
newWithKeysValues(double key1,
int value1,
double key2,
int value2,
double key3,
int value3,
double key4,
int value4) |
|
void |
put(double key,
int value) |
|
void |
putAll(DoubleIntMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
DoubleIntHashMap |
reject(DoubleIntPredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
int |
removeKeyIfAbsent(double key,
int value) |
|
DoubleIntHashMap |
select(DoubleIntPredicate predicate) |
|
ImmutableDoubleIntMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
int |
updateValue(double key,
int initialValueIfAbsent,
IntToIntFunction function) |
|
MutableIntCollection |
values() |
|
DoubleIntHashMap |
withKeysValues(double key1,
int value1,
double key2,
int value2) |
|
DoubleIntHashMap |
withKeysValues(double key1,
int value1,
double key2,
int value2,
double key3,
int value3) |
|
DoubleIntHashMap |
withKeysValues(double key1,
int value1,
double key2,
int value2,
double key3,
int value3,
double key4,
int value4) |
|
DoubleIntHashMap |
withKeyValue(double key1,
int value1) |
|
DoubleIntHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleIntHashMap |
withoutKey(double key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayisEmpty, notEmpty, sizeallSatisfy, 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, toSortedListcontainsValue, forEachValue, tapcollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic DoubleIntHashMap()
public DoubleIntHashMap(int initialCapacity)
public DoubleIntHashMap(DoubleIntMap map)
public static DoubleIntHashMap newWithKeysValues(double key1, int value1)
public static DoubleIntHashMap newWithKeysValues(double key1, int value1, double key2, int value2)
public static DoubleIntHashMap newWithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3)
public static DoubleIntHashMap newWithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3, double key4, int value4)
public boolean equals(java.lang.Object obj)
DoubleIntMapMap.equals(Object).equals in interface DoubleIntMapequals in class java.lang.Objectpublic int hashCode()
DoubleIntMapMap.hashCode().hashCode in interface DoubleIntMaphashCode in class java.lang.Objectpublic 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 DoubleIntMaptoString in interface PrimitiveIterabletoString in class AbstractIntIterableAbstractCollection.toString()public MutableIntIterator intIterator()
IntIterableintIterator in interface IntIterableintIterator in interface MutableIntValuesMappublic <V> V injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface IntIterablepublic void clear()
clear in interface MutableDoubleKeysMapclear in interface MutableIntValuesMappublic void put(double key,
int value)
put in interface MutableDoubleIntMappublic void putAll(DoubleIntMap map)
putAll in interface MutableDoubleIntMappublic void removeKey(double key)
removeKey in interface MutableDoubleIntMapremoveKey in interface MutableDoubleKeysMappublic void remove(double key)
remove in interface MutableDoubleIntMappublic int removeKeyIfAbsent(double key,
int value)
removeKeyIfAbsent in interface MutableDoubleIntMappublic int getIfAbsentPut(double key,
int value)
getIfAbsentPut in interface MutableDoubleIntMappublic int getIfAbsentPut(double key,
IntFunction0 function)
getIfAbsentPut in interface MutableDoubleIntMappublic <P> int getIfAbsentPutWith(double key,
IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableDoubleIntMappublic int getIfAbsentPutWithKey(double key,
DoubleToIntFunction function)
getIfAbsentPutWithKey in interface MutableDoubleIntMappublic int addToValue(double key,
int toBeAdded)
addToValue in interface MutableDoubleIntMappublic int updateValue(double key,
int initialValueIfAbsent,
IntToIntFunction function)
updateValue in interface MutableDoubleIntMappublic DoubleIntHashMap withKeyValue(double key1, int value1)
withKeyValue in interface MutableDoubleIntMappublic DoubleIntHashMap withKeysValues(double key1, int value1, double key2, int value2)
public DoubleIntHashMap withKeysValues(double key1, int value1, double key2, int value2, double key3, int value3)
public DoubleIntHashMap withKeysValues(double key1, int value1, double key2, int value2, double key3, int value3, double key4, int value4)
public DoubleIntHashMap withoutKey(double key)
withoutKey in interface MutableDoubleIntMappublic DoubleIntHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys in interface MutableDoubleIntMappublic MutableDoubleIntMap asUnmodifiable()
asUnmodifiable in interface MutableDoubleIntMappublic MutableDoubleIntMap asSynchronized()
asSynchronized in interface MutableDoubleIntMappublic ImmutableDoubleIntMap toImmutable()
toImmutable in interface DoubleIntMappublic int get(double key)
get in interface DoubleIntMappublic int getIfAbsent(double key,
int ifAbsent)
getIfAbsent in interface DoubleIntMappublic int getOrThrow(double key)
getOrThrow in interface DoubleIntMappublic boolean containsKey(double key)
containsKey in interface DoubleIntMapcontainsKey in interface DoubleKeysMappublic void forEachKey(DoubleProcedure procedure)
forEachKey in interface DoubleIntMapforEachKey in interface DoubleKeysMappublic void forEachKeyValue(DoubleIntProcedure procedure)
forEachKeyValue in interface DoubleIntMappublic LazyDoubleIterable keysView()
keysView in interface DoubleIntMappublic RichIterable<DoubleIntPair> keyValuesView()
keyValuesView in interface DoubleIntMappublic MutableIntDoubleMap flipUniqueValues()
DoubleIntMapflipUniqueValues in interface DoubleIntMapflipUniqueValues in interface MutableDoubleIntMappublic DoubleIntHashMap select(DoubleIntPredicate predicate)
select in interface DoubleIntMapselect in interface MutableDoubleIntMappublic DoubleIntHashMap reject(DoubleIntPredicate predicate)
reject in interface DoubleIntMapreject in interface MutableDoubleIntMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void compact()
public MutableDoubleSet keySet()
keySet in interface DoubleIntMappublic MutableIntCollection values()
values in interface IntValuesMapCopyright © 2004–2017. All rights reserved.