Externalizable
, Serializable
, FloatIterable
, DoubleFloatMap
, FloatValuesMap
, MutableDoubleFloatMap
, MutableFloatValuesMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleFloatHashMap extends AbstractMutableFloatValuesMap implements MutableDoubleFloatMap, 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(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
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(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() |
|
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(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, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue
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(Object obj)
DoubleFloatMap
Map.equals(Object)
.equals
in interface DoubleFloatMap
equals
in class Object
public int hashCode()
DoubleFloatMap
Map.hashCode()
.hashCode
in interface DoubleFloatMap
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 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 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(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 MutableDoubleSet keySet()
keySet
in interface DoubleFloatMap
public MutableFloatCollection values()
values
in interface FloatValuesMap
Copyright © 2004–2017. All rights reserved.