java.io.Externalizable
, java.io.Serializable
, LongIterable
, FloatLongMap
, LongValuesMap
, MutableFloatLongMap
, MutableLongValuesMap
, PrimitiveIterable
, MutableFloatKeysMap
, FloatKeysMap
public class FloatLongHashMap extends AbstractMutableLongValuesMap implements MutableFloatLongMap, java.io.Externalizable, MutableFloatKeysMap
Constructor | Description |
---|---|
FloatLongHashMap() |
|
FloatLongHashMap(int initialCapacity) |
|
FloatLongHashMap(FloatLongMap map) |
Modifier and Type | Method | Description |
---|---|---|
long |
addToValue(float key,
long toBeAdded) |
|
MutableFloatLongMap |
asSynchronized() |
|
MutableFloatLongMap |
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) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableLongFloatMap |
flipUniqueValues() |
Return the LongFloatMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(FloatProcedure procedure) |
|
void |
forEachKeyValue(FloatLongProcedure procedure) |
|
long |
get(float key) |
|
long |
getIfAbsent(float key,
long ifAbsent) |
|
long |
getIfAbsentPut(float key,
long value) |
|
long |
getIfAbsentPut(float key,
LongFunction0 function) |
|
<P> long |
getIfAbsentPutWith(float key,
LongFunction<? super P> function,
P parameter) |
|
long |
getIfAbsentPutWithKey(float key,
FloatToLongFunction function) |
|
long |
getOrThrow(float key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function) |
|
MutableFloatSet |
keySet() |
|
LazyFloatIterable |
keysView() |
|
RichIterable<FloatLongPair> |
keyValuesView() |
|
MutableLongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
static FloatLongHashMap |
newWithKeysValues(float key1,
long value1) |
|
static FloatLongHashMap |
newWithKeysValues(float key1,
long value1,
float key2,
long value2) |
|
static FloatLongHashMap |
newWithKeysValues(float key1,
long value1,
float key2,
long value2,
float key3,
long value3) |
|
static FloatLongHashMap |
newWithKeysValues(float key1,
long value1,
float key2,
long value2,
float key3,
long value3,
float key4,
long value4) |
|
void |
put(float key,
long value) |
|
void |
putAll(FloatLongMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
FloatLongHashMap |
reject(FloatLongPredicate predicate) |
|
void |
remove(float key) |
|
void |
removeKey(float key) |
|
long |
removeKeyIfAbsent(float key,
long value) |
|
FloatLongHashMap |
select(FloatLongPredicate predicate) |
|
ImmutableFloatLongMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
long |
updateValue(float key,
long initialValueIfAbsent,
LongToLongFunction function) |
|
MutableLongCollection |
values() |
|
FloatLongHashMap |
withKeysValues(float key1,
long value1,
float key2,
long value2) |
|
FloatLongHashMap |
withKeysValues(float key1,
long value1,
float key2,
long value2,
float key3,
long value3) |
|
FloatLongHashMap |
withKeysValues(float key1,
long value1,
float key2,
long value2,
float key3,
long value3,
float key4,
long value4) |
|
FloatLongHashMap |
withKeyValue(float key1,
long value1) |
|
FloatLongHashMap |
withoutAllKeys(FloatIterable keys) |
|
FloatLongHashMap |
withoutKey(float key) |
|
void |
writeExternal(java.io.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
isEmpty, notEmpty, size
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, 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 FloatLongHashMap()
public FloatLongHashMap(int initialCapacity)
public FloatLongHashMap(FloatLongMap map)
public static FloatLongHashMap newWithKeysValues(float key1, long value1)
public static FloatLongHashMap newWithKeysValues(float key1, long value1, float key2, long value2)
public static FloatLongHashMap newWithKeysValues(float key1, long value1, float key2, long value2, float key3, long value3)
public static FloatLongHashMap newWithKeysValues(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4)
public boolean equals(java.lang.Object obj)
FloatLongMap
Map.equals(Object)
.equals
in interface FloatLongMap
equals
in class java.lang.Object
public int hashCode()
FloatLongMap
Map.hashCode()
.hashCode
in interface FloatLongMap
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 FloatLongMap
toString
in interface PrimitiveIterable
toString
in class AbstractLongIterable
AbstractCollection.toString()
public MutableLongIterator longIterator()
LongIterable
longIterator
in interface LongIterable
longIterator
in interface MutableLongValuesMap
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)
injectInto
in interface LongIterable
public void clear()
clear
in interface MutableFloatKeysMap
clear
in interface MutableLongValuesMap
public void put(float key, long value)
put
in interface MutableFloatLongMap
public void putAll(FloatLongMap map)
putAll
in interface MutableFloatLongMap
public void removeKey(float key)
removeKey
in interface MutableFloatKeysMap
removeKey
in interface MutableFloatLongMap
public void remove(float key)
remove
in interface MutableFloatLongMap
public long removeKeyIfAbsent(float key, long value)
removeKeyIfAbsent
in interface MutableFloatLongMap
public long getIfAbsentPut(float key, long value)
getIfAbsentPut
in interface MutableFloatLongMap
public long getIfAbsentPut(float key, LongFunction0 function)
getIfAbsentPut
in interface MutableFloatLongMap
public <P> long getIfAbsentPutWith(float key, LongFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableFloatLongMap
public long getIfAbsentPutWithKey(float key, FloatToLongFunction function)
getIfAbsentPutWithKey
in interface MutableFloatLongMap
public long addToValue(float key, long toBeAdded)
addToValue
in interface MutableFloatLongMap
public long updateValue(float key, long initialValueIfAbsent, LongToLongFunction function)
updateValue
in interface MutableFloatLongMap
public FloatLongHashMap withKeyValue(float key1, long value1)
withKeyValue
in interface MutableFloatLongMap
public FloatLongHashMap withKeysValues(float key1, long value1, float key2, long value2)
public FloatLongHashMap withKeysValues(float key1, long value1, float key2, long value2, float key3, long value3)
public FloatLongHashMap withKeysValues(float key1, long value1, float key2, long value2, float key3, long value3, float key4, long value4)
public FloatLongHashMap withoutKey(float key)
withoutKey
in interface MutableFloatLongMap
public FloatLongHashMap withoutAllKeys(FloatIterable keys)
withoutAllKeys
in interface MutableFloatLongMap
public MutableFloatLongMap asUnmodifiable()
asUnmodifiable
in interface MutableFloatLongMap
public MutableFloatLongMap asSynchronized()
asSynchronized
in interface MutableFloatLongMap
public ImmutableFloatLongMap toImmutable()
toImmutable
in interface FloatLongMap
public long get(float key)
get
in interface FloatLongMap
public long getIfAbsent(float key, long ifAbsent)
getIfAbsent
in interface FloatLongMap
public long getOrThrow(float key)
getOrThrow
in interface FloatLongMap
public boolean containsKey(float key)
containsKey
in interface FloatKeysMap
containsKey
in interface FloatLongMap
public void forEachKey(FloatProcedure procedure)
forEachKey
in interface FloatKeysMap
forEachKey
in interface FloatLongMap
public void forEachKeyValue(FloatLongProcedure procedure)
forEachKeyValue
in interface FloatLongMap
public LazyFloatIterable keysView()
keysView
in interface FloatLongMap
public RichIterable<FloatLongPair> keyValuesView()
keyValuesView
in interface FloatLongMap
public MutableLongFloatMap flipUniqueValues()
FloatLongMap
flipUniqueValues
in interface FloatLongMap
flipUniqueValues
in interface MutableFloatLongMap
public FloatLongHashMap select(FloatLongPredicate predicate)
select
in interface FloatLongMap
select
in interface MutableFloatLongMap
public FloatLongHashMap reject(FloatLongPredicate predicate)
reject
in interface FloatLongMap
reject
in interface MutableFloatLongMap
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 MutableFloatSet keySet()
keySet
in interface FloatLongMap
public MutableLongCollection values()
values
in interface LongValuesMap
Copyright © 2004–2018. All rights reserved.