java.io.Externalizable, java.io.Serializable, FloatIterable, DoubleFloatMap, FloatValuesMap, MutableDoubleFloatMap, MutableFloatValuesMap, PrimitiveIterable, MutableDoubleKeysMap, DoubleKeysMappublic class DoubleFloatHashMap extends AbstractMutableFloatValuesMap implements MutableDoubleFloatMap, java.io.Externalizable, MutableDoubleKeysMap
| Constructor | Description |
|---|---|
DoubleFloatHashMap() |
|
DoubleFloatHashMap(int initialCapacity) |
|
DoubleFloatHashMap(DoubleFloatMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
float |
addToValue(double key,
float toBeAdded) |
|
MutableDoubleFloatMap |
asSynchronized() |
|
MutableDoubleFloatMap |
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). |
MutableFloatDoubleMap |
flipUniqueValues() |
Return the FloatDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
MutableFloatIterator |
floatIterator() |
Returns a primitive iterator that can be used to iterate over the FloatIterable in an
imperative style.
|
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleFloatProcedure procedure) |
|
float |
get(double key) |
|
float |
getIfAbsent(double key,
float ifAbsent) |
|
float |
getIfAbsentPut(double key,
float value) |
|
float |
getIfAbsentPut(double key,
FloatFunction0 function) |
|
<P> float |
getIfAbsentPutWith(double key,
FloatFunction<? super P> function,
P parameter) |
|
float |
getIfAbsentPutWithKey(double key,
DoubleToFloatFunction function) |
|
float |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectFloatToObjectFunction<? super V,? extends V> function) |
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleFloatPair> |
keyValuesView() |
|
static DoubleFloatHashMap |
newWithKeysValues(double key1,
float value1) |
|
static DoubleFloatHashMap |
newWithKeysValues(double key1,
float value1,
double key2,
float value2) |
|
static DoubleFloatHashMap |
newWithKeysValues(double key1,
float value1,
double key2,
float value2,
double key3,
float value3) |
|
static DoubleFloatHashMap |
newWithKeysValues(double key1,
float value1,
double key2,
float value2,
double key3,
float value3,
double key4,
float value4) |
|
void |
put(double key,
float value) |
|
void |
putAll(DoubleFloatMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
DoubleFloatHashMap |
reject(DoubleFloatPredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
float |
removeKeyIfAbsent(double key,
float value) |
|
DoubleFloatHashMap |
select(DoubleFloatPredicate predicate) |
|
ImmutableDoubleFloatMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
float |
updateValue(double key,
float initialValueIfAbsent,
FloatToFloatFunction function) |
|
MutableFloatCollection |
values() |
|
DoubleFloatHashMap |
withKeysValues(double key1,
float value1,
double key2,
float value2) |
|
DoubleFloatHashMap |
withKeysValues(double key1,
float value1,
double key2,
float value2,
double key3,
float value3) |
|
DoubleFloatHashMap |
withKeysValues(double key1,
float value1,
double key2,
float value2,
double key3,
float value3,
double key4,
float value4) |
|
DoubleFloatHashMap |
withKeyValue(double key1,
float value1) |
|
DoubleFloatHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleFloatHashMap |
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, tapputPaircollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic DoubleFloatHashMap()
public DoubleFloatHashMap(int initialCapacity)
public DoubleFloatHashMap(DoubleFloatMap map)
public static DoubleFloatHashMap newWithKeysValues(double key1, float value1)
public static DoubleFloatHashMap newWithKeysValues(double key1, float value1, double key2, float value2)
public static DoubleFloatHashMap newWithKeysValues(double key1, float value1, double key2, float value2, double key3, float value3)
public static DoubleFloatHashMap newWithKeysValues(double key1, float value1, double key2, float value2, double key3, float value3, double key4, float value4)
public boolean equals(java.lang.Object obj)
DoubleFloatMapMap.equals(Object).equals in interface DoubleFloatMapequals in class java.lang.Objectpublic int hashCode()
DoubleFloatMapMap.hashCode().hashCode in interface DoubleFloatMaphashCode 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 DoubleFloatMaptoString in interface PrimitiveIterabletoString in class AbstractFloatIterableAbstractCollection.toString()public MutableFloatIterator floatIterator()
FloatIterablefloatIterator in interface FloatIterablefloatIterator in interface MutableFloatValuesMappublic <V> V injectInto(V injectedValue,
ObjectFloatToObjectFunction<? super V,? extends V> function)
injectInto in interface FloatIterablepublic void clear()
clear in interface MutableDoubleKeysMapclear in interface MutableFloatValuesMappublic void put(double key,
float value)
put in interface MutableDoubleFloatMappublic void putAll(DoubleFloatMap map)
putAll in interface MutableDoubleFloatMappublic void removeKey(double key)
removeKey in interface MutableDoubleFloatMapremoveKey in interface MutableDoubleKeysMappublic void remove(double key)
remove in interface MutableDoubleFloatMappublic float removeKeyIfAbsent(double key,
float value)
removeKeyIfAbsent in interface MutableDoubleFloatMappublic float getIfAbsentPut(double key,
float value)
getIfAbsentPut in interface MutableDoubleFloatMappublic float getIfAbsentPut(double key,
FloatFunction0 function)
getIfAbsentPut in interface MutableDoubleFloatMappublic <P> float getIfAbsentPutWith(double key,
FloatFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableDoubleFloatMappublic float getIfAbsentPutWithKey(double key,
DoubleToFloatFunction function)
getIfAbsentPutWithKey in interface MutableDoubleFloatMappublic float addToValue(double key,
float toBeAdded)
addToValue in interface MutableDoubleFloatMappublic float updateValue(double key,
float initialValueIfAbsent,
FloatToFloatFunction function)
updateValue in interface MutableDoubleFloatMappublic DoubleFloatHashMap withKeyValue(double key1, float value1)
withKeyValue in interface MutableDoubleFloatMappublic DoubleFloatHashMap withKeysValues(double key1, float value1, double key2, float value2)
public DoubleFloatHashMap withKeysValues(double key1, float value1, double key2, float value2, double key3, float value3)
public DoubleFloatHashMap withKeysValues(double key1, float value1, double key2, float value2, double key3, float value3, double key4, float value4)
public DoubleFloatHashMap withoutKey(double key)
withoutKey in interface MutableDoubleFloatMappublic DoubleFloatHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys in interface MutableDoubleFloatMappublic MutableDoubleFloatMap asUnmodifiable()
asUnmodifiable in interface MutableDoubleFloatMappublic MutableDoubleFloatMap asSynchronized()
asSynchronized in interface MutableDoubleFloatMappublic ImmutableDoubleFloatMap toImmutable()
toImmutable in interface DoubleFloatMappublic float get(double key)
get in interface DoubleFloatMappublic float getIfAbsent(double key,
float ifAbsent)
getIfAbsent in interface DoubleFloatMappublic float getOrThrow(double key)
getOrThrow in interface DoubleFloatMappublic boolean containsKey(double key)
containsKey in interface DoubleFloatMapcontainsKey in interface DoubleKeysMappublic void forEachKey(DoubleProcedure procedure)
forEachKey in interface DoubleFloatMapforEachKey in interface DoubleKeysMappublic void forEachKeyValue(DoubleFloatProcedure procedure)
forEachKeyValue in interface DoubleFloatMappublic LazyDoubleIterable keysView()
keysView in interface DoubleFloatMappublic RichIterable<DoubleFloatPair> keyValuesView()
keyValuesView in interface DoubleFloatMappublic MutableFloatDoubleMap flipUniqueValues()
DoubleFloatMapflipUniqueValues in interface DoubleFloatMapflipUniqueValues in interface MutableDoubleFloatMappublic DoubleFloatHashMap select(DoubleFloatPredicate predicate)
select in interface DoubleFloatMapselect in interface MutableDoubleFloatMappublic DoubleFloatHashMap reject(DoubleFloatPredicate predicate)
reject in interface DoubleFloatMapreject in interface MutableDoubleFloatMappublic 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 DoubleFloatMappublic MutableFloatCollection values()
values in interface FloatValuesMapCopyright © 2004–2018. All rights reserved.