java.io.Externalizable
, java.io.Serializable
, FloatIterable
, DoubleFloatMap
, FloatValuesMap
, MutableDoubleFloatMap
, MutableFloatValuesMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public 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, toSortedList
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
isEmpty, notEmpty, size
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
containsValue, forEachValue, tap
putPair
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public 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)
DoubleFloatMap
Map.equals(Object)
.equals
in interface DoubleFloatMap
equals
in class java.lang.Object
public int hashCode()
DoubleFloatMap
Map.hashCode()
.hashCode
in interface DoubleFloatMap
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 DoubleFloatMap
toString
in interface PrimitiveIterable
toString
in class AbstractFloatIterable
AbstractCollection.toString()
public MutableFloatIterator floatIterator()
FloatIterable
floatIterator
in interface FloatIterable
floatIterator
in interface MutableFloatValuesMap
public <V> V injectInto(V injectedValue, ObjectFloatToObjectFunction<? super V,? extends V> function)
injectInto
in interface FloatIterable
public void clear()
clear
in interface MutableDoubleKeysMap
clear
in interface MutableFloatValuesMap
public void put(double key, float value)
put
in interface MutableDoubleFloatMap
public void putAll(DoubleFloatMap map)
putAll
in interface MutableDoubleFloatMap
public void removeKey(double key)
removeKey
in interface MutableDoubleFloatMap
removeKey
in interface MutableDoubleKeysMap
public void remove(double key)
remove
in interface MutableDoubleFloatMap
public float removeKeyIfAbsent(double key, float value)
removeKeyIfAbsent
in interface MutableDoubleFloatMap
public float getIfAbsentPut(double key, float value)
getIfAbsentPut
in interface MutableDoubleFloatMap
public float getIfAbsentPut(double key, FloatFunction0 function)
getIfAbsentPut
in interface MutableDoubleFloatMap
public <P> float getIfAbsentPutWith(double key, FloatFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleFloatMap
public float getIfAbsentPutWithKey(double key, DoubleToFloatFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleFloatMap
public float addToValue(double key, float toBeAdded)
addToValue
in interface MutableDoubleFloatMap
public float updateValue(double key, float initialValueIfAbsent, FloatToFloatFunction function)
updateValue
in interface MutableDoubleFloatMap
public DoubleFloatHashMap withKeyValue(double key1, float value1)
withKeyValue
in interface MutableDoubleFloatMap
public 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 MutableDoubleFloatMap
public DoubleFloatHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleFloatMap
public MutableDoubleFloatMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleFloatMap
public MutableDoubleFloatMap asSynchronized()
asSynchronized
in interface MutableDoubleFloatMap
public ImmutableDoubleFloatMap toImmutable()
toImmutable
in interface DoubleFloatMap
public float get(double key)
get
in interface DoubleFloatMap
public float getIfAbsent(double key, float ifAbsent)
getIfAbsent
in interface DoubleFloatMap
public float getOrThrow(double key)
getOrThrow
in interface DoubleFloatMap
public boolean containsKey(double key)
containsKey
in interface DoubleFloatMap
containsKey
in interface DoubleKeysMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleFloatMap
forEachKey
in interface DoubleKeysMap
public void forEachKeyValue(DoubleFloatProcedure procedure)
forEachKeyValue
in interface DoubleFloatMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleFloatMap
public RichIterable<DoubleFloatPair> keyValuesView()
keyValuesView
in interface DoubleFloatMap
public MutableFloatDoubleMap flipUniqueValues()
DoubleFloatMap
flipUniqueValues
in interface DoubleFloatMap
flipUniqueValues
in interface MutableDoubleFloatMap
public DoubleFloatHashMap select(DoubleFloatPredicate predicate)
select
in interface DoubleFloatMap
select
in interface MutableDoubleFloatMap
public DoubleFloatHashMap reject(DoubleFloatPredicate predicate)
reject
in interface DoubleFloatMap
reject
in interface MutableDoubleFloatMap
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 DoubleFloatMap
public MutableFloatCollection values()
values
in interface FloatValuesMap
Copyright © 2004–2018. All rights reserved.