java.io.Externalizable
, java.io.Serializable
, FloatIterable
, FloatValuesMap
, LongFloatMap
, MutableFloatValuesMap
, MutableLongFloatMap
, PrimitiveIterable
, MutableLongKeysMap
, LongKeysMap
public class LongFloatHashMap extends AbstractMutableFloatValuesMap implements MutableLongFloatMap, java.io.Externalizable, MutableLongKeysMap
Constructor | Description |
---|---|
LongFloatHashMap() |
|
LongFloatHashMap(int initialCapacity) |
|
LongFloatHashMap(LongFloatMap map) |
Modifier and Type | Method | Description |
---|---|---|
float |
addToValue(long key,
float toBeAdded) |
|
MutableLongFloatMap |
asSynchronized() |
|
MutableLongFloatMap |
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(long key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableFloatLongMap |
flipUniqueValues() |
Return the FloatLongMap 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(LongProcedure procedure) |
|
void |
forEachKeyValue(LongFloatProcedure procedure) |
|
float |
get(long key) |
|
float |
getIfAbsent(long key,
float ifAbsent) |
|
float |
getIfAbsentPut(long key,
float value) |
|
float |
getIfAbsentPut(long key,
FloatFunction0 function) |
|
<P> float |
getIfAbsentPutWith(long key,
FloatFunction<? super P> function,
P parameter) |
|
float |
getIfAbsentPutWithKey(long key,
LongToFloatFunction function) |
|
float |
getOrThrow(long key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectFloatToObjectFunction<? super V,? extends V> function) |
|
MutableLongSet |
keySet() |
|
LazyLongIterable |
keysView() |
|
RichIterable<LongFloatPair> |
keyValuesView() |
|
static LongFloatHashMap |
newWithKeysValues(long key1,
float value1) |
|
static LongFloatHashMap |
newWithKeysValues(long key1,
float value1,
long key2,
float value2) |
|
static LongFloatHashMap |
newWithKeysValues(long key1,
float value1,
long key2,
float value2,
long key3,
float value3) |
|
static LongFloatHashMap |
newWithKeysValues(long key1,
float value1,
long key2,
float value2,
long key3,
float value3,
long key4,
float value4) |
|
void |
put(long key,
float value) |
|
void |
putAll(LongFloatMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
LongFloatHashMap |
reject(LongFloatPredicate predicate) |
|
void |
remove(long key) |
|
void |
removeKey(long key) |
|
float |
removeKeyIfAbsent(long key,
float value) |
|
LongFloatHashMap |
select(LongFloatPredicate predicate) |
|
ImmutableLongFloatMap |
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(long key,
float initialValueIfAbsent,
FloatToFloatFunction function) |
|
MutableFloatCollection |
values() |
|
LongFloatHashMap |
withKeysValues(long key1,
float value1,
long key2,
float value2) |
|
LongFloatHashMap |
withKeysValues(long key1,
float value1,
long key2,
float value2,
long key3,
float value3) |
|
LongFloatHashMap |
withKeysValues(long key1,
float value1,
long key2,
float value2,
long key3,
float value3,
long key4,
float value4) |
|
LongFloatHashMap |
withKeyValue(long key1,
float value1) |
|
LongFloatHashMap |
withoutAllKeys(LongIterable keys) |
|
LongFloatHashMap |
withoutKey(long 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
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
isEmpty, notEmpty, size
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public LongFloatHashMap()
public LongFloatHashMap(int initialCapacity)
public LongFloatHashMap(LongFloatMap map)
public static LongFloatHashMap newWithKeysValues(long key1, float value1)
public static LongFloatHashMap newWithKeysValues(long key1, float value1, long key2, float value2)
public static LongFloatHashMap newWithKeysValues(long key1, float value1, long key2, float value2, long key3, float value3)
public static LongFloatHashMap newWithKeysValues(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4)
public boolean equals(java.lang.Object obj)
LongFloatMap
Map.equals(Object)
.equals
in interface LongFloatMap
equals
in class java.lang.Object
public int hashCode()
LongFloatMap
Map.hashCode()
.hashCode
in interface LongFloatMap
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 LongFloatMap
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 MutableFloatValuesMap
clear
in interface MutableLongKeysMap
public void put(long key, float value)
put
in interface MutableLongFloatMap
public void putAll(LongFloatMap map)
putAll
in interface MutableLongFloatMap
public void removeKey(long key)
removeKey
in interface MutableLongFloatMap
removeKey
in interface MutableLongKeysMap
public void remove(long key)
remove
in interface MutableLongFloatMap
public float removeKeyIfAbsent(long key, float value)
removeKeyIfAbsent
in interface MutableLongFloatMap
public float getIfAbsentPut(long key, float value)
getIfAbsentPut
in interface MutableLongFloatMap
public float getIfAbsentPut(long key, FloatFunction0 function)
getIfAbsentPut
in interface MutableLongFloatMap
public <P> float getIfAbsentPutWith(long key, FloatFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableLongFloatMap
public float getIfAbsentPutWithKey(long key, LongToFloatFunction function)
getIfAbsentPutWithKey
in interface MutableLongFloatMap
public float addToValue(long key, float toBeAdded)
addToValue
in interface MutableLongFloatMap
public float updateValue(long key, float initialValueIfAbsent, FloatToFloatFunction function)
updateValue
in interface MutableLongFloatMap
public LongFloatHashMap withKeyValue(long key1, float value1)
withKeyValue
in interface MutableLongFloatMap
public LongFloatHashMap withKeysValues(long key1, float value1, long key2, float value2)
public LongFloatHashMap withKeysValues(long key1, float value1, long key2, float value2, long key3, float value3)
public LongFloatHashMap withKeysValues(long key1, float value1, long key2, float value2, long key3, float value3, long key4, float value4)
public LongFloatHashMap withoutKey(long key)
withoutKey
in interface MutableLongFloatMap
public LongFloatHashMap withoutAllKeys(LongIterable keys)
withoutAllKeys
in interface MutableLongFloatMap
public MutableLongFloatMap asUnmodifiable()
asUnmodifiable
in interface MutableLongFloatMap
public MutableLongFloatMap asSynchronized()
asSynchronized
in interface MutableLongFloatMap
public ImmutableLongFloatMap toImmutable()
toImmutable
in interface LongFloatMap
public float get(long key)
get
in interface LongFloatMap
public float getIfAbsent(long key, float ifAbsent)
getIfAbsent
in interface LongFloatMap
public float getOrThrow(long key)
getOrThrow
in interface LongFloatMap
public boolean containsKey(long key)
containsKey
in interface LongFloatMap
containsKey
in interface LongKeysMap
public void forEachKey(LongProcedure procedure)
forEachKey
in interface LongFloatMap
forEachKey
in interface LongKeysMap
public void forEachKeyValue(LongFloatProcedure procedure)
forEachKeyValue
in interface LongFloatMap
public LazyLongIterable keysView()
keysView
in interface LongFloatMap
public RichIterable<LongFloatPair> keyValuesView()
keyValuesView
in interface LongFloatMap
public MutableFloatLongMap flipUniqueValues()
LongFloatMap
flipUniqueValues
in interface LongFloatMap
flipUniqueValues
in interface MutableLongFloatMap
public LongFloatHashMap select(LongFloatPredicate predicate)
select
in interface LongFloatMap
select
in interface MutableLongFloatMap
public LongFloatHashMap reject(LongFloatPredicate predicate)
reject
in interface LongFloatMap
reject
in interface MutableLongFloatMap
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 MutableLongSet keySet()
keySet
in interface LongFloatMap
public MutableFloatCollection values()
values
in interface FloatValuesMap
Copyright © 2004–2017. All rights reserved.