java.io.Externalizable, java.io.Serializable, FloatIterable, FloatValuesMap, LongFloatMap, MutableFloatValuesMap, MutableLongFloatMap, PrimitiveIterable, MutableLongKeysMap, LongKeysMappublic 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) |
|
void |
updateValues(LongFloatToFloatFunction function) |
Updates the values in-place.
|
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, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayallSatisfy, 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, toSortedListcontainsValue, forEachValue, tapisEmpty, notEmpty, sizecollect, reject, selectputPair, withAllKeyValuesappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic 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)
LongFloatMapMap.equals(Object).equals in interface LongFloatMapequals in class java.lang.Objectpublic int hashCode()
LongFloatMapMap.hashCode().hashCode in interface LongFloatMaphashCode 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 LongFloatMaptoString 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 MutableFloatValuesMapclear in interface MutableLongKeysMappublic void put(long key,
float value)
put in interface MutableLongFloatMappublic void putAll(LongFloatMap map)
putAll in interface MutableLongFloatMappublic void updateValues(LongFloatToFloatFunction function)
MutableLongFloatMapupdateValues in interface MutableLongFloatMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(long key)
removeKey in interface MutableLongFloatMapremoveKey in interface MutableLongKeysMappublic void remove(long key)
remove in interface MutableLongFloatMappublic float removeKeyIfAbsent(long key,
float value)
removeKeyIfAbsent in interface MutableLongFloatMappublic float getIfAbsentPut(long key,
float value)
getIfAbsentPut in interface MutableLongFloatMappublic float getIfAbsentPut(long key,
FloatFunction0 function)
getIfAbsentPut in interface MutableLongFloatMappublic <P> float getIfAbsentPutWith(long key,
FloatFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableLongFloatMappublic float getIfAbsentPutWithKey(long key,
LongToFloatFunction function)
getIfAbsentPutWithKey in interface MutableLongFloatMappublic float addToValue(long key,
float toBeAdded)
addToValue in interface MutableLongFloatMappublic float updateValue(long key,
float initialValueIfAbsent,
FloatToFloatFunction function)
updateValue in interface MutableLongFloatMappublic LongFloatHashMap withKeyValue(long key1, float value1)
withKeyValue in interface MutableLongFloatMappublic 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 MutableLongFloatMappublic LongFloatHashMap withoutAllKeys(LongIterable keys)
withoutAllKeys in interface MutableLongFloatMappublic MutableLongFloatMap asUnmodifiable()
asUnmodifiable in interface MutableLongFloatMappublic MutableLongFloatMap asSynchronized()
asSynchronized in interface MutableLongFloatMappublic ImmutableLongFloatMap toImmutable()
toImmutable in interface LongFloatMappublic float get(long key)
get in interface LongFloatMappublic float getIfAbsent(long key,
float ifAbsent)
getIfAbsent in interface LongFloatMappublic float getOrThrow(long key)
getOrThrow in interface LongFloatMappublic boolean containsKey(long key)
containsKey in interface LongFloatMapcontainsKey in interface LongKeysMappublic void forEachKey(LongProcedure procedure)
forEachKey in interface LongFloatMapforEachKey in interface LongKeysMappublic void forEachKeyValue(LongFloatProcedure procedure)
forEachKeyValue in interface LongFloatMappublic LazyLongIterable keysView()
keysView in interface LongFloatMappublic RichIterable<LongFloatPair> keyValuesView()
keyValuesView in interface LongFloatMappublic MutableFloatLongMap flipUniqueValues()
LongFloatMapflipUniqueValues in interface LongFloatMapflipUniqueValues in interface MutableLongFloatMappublic LongFloatHashMap select(LongFloatPredicate predicate)
select in interface LongFloatMapselect in interface MutableLongFloatMappublic LongFloatHashMap reject(LongFloatPredicate predicate)
reject in interface LongFloatMapreject in interface MutableLongFloatMappublic 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 MutableLongSet keySet()
keySet in interface LongFloatMappublic MutableFloatCollection values()
values in interface FloatValuesMapCopyright © 2004–2020. All rights reserved.