Externalizable
, Serializable
, DoubleIterable
, DoubleValuesMap
, FloatDoubleMap
, MutableDoubleValuesMap
, MutableFloatDoubleMap
, PrimitiveIterable
, MutableFloatKeysMap
, FloatKeysMap
public class FloatDoubleHashMap extends AbstractMutableDoubleValuesMap implements MutableFloatDoubleMap, Externalizable, MutableFloatKeysMap
Constructor | Description |
---|---|
FloatDoubleHashMap() |
|
FloatDoubleHashMap(int initialCapacity) |
|
FloatDoubleHashMap(FloatDoubleMap map) |
Modifier and Type | Method | Description |
---|---|---|
double |
addToValue(float key,
double toBeAdded) |
|
MutableFloatDoubleMap |
asSynchronized() |
|
MutableFloatDoubleMap |
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(float key) |
|
MutableDoubleIterator |
doubleIterator() |
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an
imperative style.
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableDoubleFloatMap |
flipUniqueValues() |
Return the DoubleFloatMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(FloatProcedure procedure) |
|
void |
forEachKeyValue(FloatDoubleProcedure procedure) |
|
double |
get(float key) |
|
double |
getIfAbsent(float key,
double ifAbsent) |
|
double |
getIfAbsentPut(float key,
double value) |
|
double |
getIfAbsentPut(float key,
DoubleFunction0 function) |
|
<P> double |
getIfAbsentPutWith(float key,
DoubleFunction<? super P> function,
P parameter) |
|
double |
getIfAbsentPutWithKey(float key,
FloatToDoubleFunction function) |
|
double |
getOrThrow(float key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectDoubleToObjectFunction<? super V,? extends V> function) |
|
MutableFloatSet |
keySet() |
|
LazyFloatIterable |
keysView() |
|
RichIterable<FloatDoublePair> |
keyValuesView() |
|
static FloatDoubleHashMap |
newWithKeysValues(float key1,
double value1) |
|
static FloatDoubleHashMap |
newWithKeysValues(float key1,
double value1,
float key2,
double value2) |
|
static FloatDoubleHashMap |
newWithKeysValues(float key1,
double value1,
float key2,
double value2,
float key3,
double value3) |
|
static FloatDoubleHashMap |
newWithKeysValues(float key1,
double value1,
float key2,
double value2,
float key3,
double value3,
float key4,
double value4) |
|
void |
put(float key,
double value) |
|
void |
putAll(FloatDoubleMap map) |
|
void |
readExternal(ObjectInput in) |
|
FloatDoubleHashMap |
reject(FloatDoublePredicate predicate) |
|
void |
remove(float key) |
|
void |
removeKey(float key) |
|
double |
removeKeyIfAbsent(float key,
double value) |
|
FloatDoubleHashMap |
select(FloatDoublePredicate predicate) |
|
ImmutableFloatDoubleMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
double |
updateValue(float key,
double initialValueIfAbsent,
DoubleToDoubleFunction function) |
|
void |
updateValues(FloatDoubleToDoubleFunction function) |
Updates the values in-place.
|
MutableDoubleCollection |
values() |
|
FloatDoubleHashMap |
withKeysValues(float key1,
double value1,
float key2,
double value2) |
|
FloatDoubleHashMap |
withKeysValues(float key1,
double value1,
float key2,
double value2,
float key3,
double value3) |
|
FloatDoubleHashMap |
withKeysValues(float key1,
double value1,
float key2,
double value2,
float key3,
double value3,
float key4,
double value4) |
|
FloatDoubleHashMap |
withKeyValue(float key1,
double value1) |
|
FloatDoubleHashMap |
withoutAllKeys(FloatIterable keys) |
|
FloatDoubleHashMap |
withoutKey(float key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue, tap
isEmpty, notEmpty, size
collect, reject, select
putPair, withAllKeyValues
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public FloatDoubleHashMap()
public FloatDoubleHashMap(int initialCapacity)
public FloatDoubleHashMap(FloatDoubleMap map)
public static FloatDoubleHashMap newWithKeysValues(float key1, double value1)
public static FloatDoubleHashMap newWithKeysValues(float key1, double value1, float key2, double value2)
public static FloatDoubleHashMap newWithKeysValues(float key1, double value1, float key2, double value2, float key3, double value3)
public static FloatDoubleHashMap newWithKeysValues(float key1, double value1, float key2, double value2, float key3, double value3, float key4, double value4)
public boolean equals(Object obj)
FloatDoubleMap
Map.equals(Object)
.equals
in interface FloatDoubleMap
equals
in class Object
public int hashCode()
FloatDoubleMap
Map.hashCode()
.hashCode
in interface FloatDoubleMap
hashCode
in class Object
public 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 FloatDoubleMap
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 MutableDoubleValuesMap
clear
in interface MutableFloatKeysMap
public void put(float key, double value)
put
in interface MutableFloatDoubleMap
public void putAll(FloatDoubleMap map)
putAll
in interface MutableFloatDoubleMap
public void updateValues(FloatDoubleToDoubleFunction function)
MutableFloatDoubleMap
updateValues
in interface MutableFloatDoubleMap
function
- that takes a key and its value and that returns a new value for this keypublic void removeKey(float key)
removeKey
in interface MutableFloatDoubleMap
removeKey
in interface MutableFloatKeysMap
public void remove(float key)
remove
in interface MutableFloatDoubleMap
public double removeKeyIfAbsent(float key, double value)
removeKeyIfAbsent
in interface MutableFloatDoubleMap
public double getIfAbsentPut(float key, double value)
getIfAbsentPut
in interface MutableFloatDoubleMap
public double getIfAbsentPut(float key, DoubleFunction0 function)
getIfAbsentPut
in interface MutableFloatDoubleMap
public <P> double getIfAbsentPutWith(float key, DoubleFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableFloatDoubleMap
public double getIfAbsentPutWithKey(float key, FloatToDoubleFunction function)
getIfAbsentPutWithKey
in interface MutableFloatDoubleMap
public double addToValue(float key, double toBeAdded)
addToValue
in interface MutableFloatDoubleMap
public double updateValue(float key, double initialValueIfAbsent, DoubleToDoubleFunction function)
updateValue
in interface MutableFloatDoubleMap
public FloatDoubleHashMap withKeyValue(float key1, double value1)
withKeyValue
in interface MutableFloatDoubleMap
public FloatDoubleHashMap withKeysValues(float key1, double value1, float key2, double value2)
public FloatDoubleHashMap withKeysValues(float key1, double value1, float key2, double value2, float key3, double value3)
public FloatDoubleHashMap withKeysValues(float key1, double value1, float key2, double value2, float key3, double value3, float key4, double value4)
public FloatDoubleHashMap withoutKey(float key)
withoutKey
in interface MutableFloatDoubleMap
public FloatDoubleHashMap withoutAllKeys(FloatIterable keys)
withoutAllKeys
in interface MutableFloatDoubleMap
public MutableFloatDoubleMap asUnmodifiable()
asUnmodifiable
in interface MutableFloatDoubleMap
public MutableFloatDoubleMap asSynchronized()
asSynchronized
in interface MutableFloatDoubleMap
public ImmutableFloatDoubleMap toImmutable()
toImmutable
in interface FloatDoubleMap
public double get(float key)
get
in interface FloatDoubleMap
public double getIfAbsent(float key, double ifAbsent)
getIfAbsent
in interface FloatDoubleMap
public double getOrThrow(float key)
getOrThrow
in interface FloatDoubleMap
public boolean containsKey(float key)
containsKey
in interface FloatDoubleMap
containsKey
in interface FloatKeysMap
public void forEachKey(FloatProcedure procedure)
forEachKey
in interface FloatDoubleMap
forEachKey
in interface FloatKeysMap
public void forEachKeyValue(FloatDoubleProcedure procedure)
forEachKeyValue
in interface FloatDoubleMap
public LazyFloatIterable keysView()
keysView
in interface FloatDoubleMap
public RichIterable<FloatDoublePair> keyValuesView()
keyValuesView
in interface FloatDoubleMap
public MutableDoubleFloatMap flipUniqueValues()
FloatDoubleMap
flipUniqueValues
in interface FloatDoubleMap
flipUniqueValues
in interface MutableFloatDoubleMap
public FloatDoubleHashMap select(FloatDoublePredicate predicate)
select
in interface FloatDoubleMap
select
in interface MutableFloatDoubleMap
public FloatDoubleHashMap reject(FloatDoublePredicate predicate)
reject
in interface FloatDoubleMap
reject
in interface MutableFloatDoubleMap
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void compact()
public MutableFloatSet keySet()
keySet
in interface FloatDoubleMap
public MutableDoubleCollection values()
values
in interface DoubleValuesMap
Copyright © 2004–2019. All rights reserved.