java.io.Externalizable, java.io.Serializable, FloatIterable, FloatValuesMap, IntFloatMap, MutableFloatValuesMap, MutableIntFloatMap, PrimitiveIterable, MutableIntKeysMap, IntKeysMappublic class IntFloatHashMap extends AbstractMutableFloatValuesMap implements MutableIntFloatMap, java.io.Externalizable, MutableIntKeysMap
| Constructor | Description |
|---|---|
IntFloatHashMap() |
|
IntFloatHashMap(int initialCapacity) |
|
IntFloatHashMap(IntFloatMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
float |
addToValue(int key,
float toBeAdded) |
|
MutableIntFloatMap |
asSynchronized() |
|
MutableIntFloatMap |
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(int key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableFloatIntMap |
flipUniqueValues() |
Return the FloatIntMap 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(IntProcedure procedure) |
|
void |
forEachKeyValue(IntFloatProcedure procedure) |
|
float |
get(int key) |
|
float |
getIfAbsent(int key,
float ifAbsent) |
|
float |
getIfAbsentPut(int key,
float value) |
|
float |
getIfAbsentPut(int key,
FloatFunction0 function) |
|
<P> float |
getIfAbsentPutWith(int key,
FloatFunction<? super P> function,
P parameter) |
|
float |
getIfAbsentPutWithKey(int key,
IntToFloatFunction function) |
|
float |
getOrThrow(int key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectFloatToObjectFunction<? super V,? extends V> function) |
|
MutableIntSet |
keySet() |
|
LazyIntIterable |
keysView() |
|
RichIterable<IntFloatPair> |
keyValuesView() |
|
static IntFloatHashMap |
newWithKeysValues(int key1,
float value1) |
|
static IntFloatHashMap |
newWithKeysValues(int key1,
float value1,
int key2,
float value2) |
|
static IntFloatHashMap |
newWithKeysValues(int key1,
float value1,
int key2,
float value2,
int key3,
float value3) |
|
static IntFloatHashMap |
newWithKeysValues(int key1,
float value1,
int key2,
float value2,
int key3,
float value3,
int key4,
float value4) |
|
void |
put(int key,
float value) |
|
void |
putAll(IntFloatMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
IntFloatHashMap |
reject(IntFloatPredicate predicate) |
|
void |
remove(int key) |
|
void |
removeKey(int key) |
|
float |
removeKeyIfAbsent(int key,
float value) |
|
IntFloatHashMap |
select(IntFloatPredicate predicate) |
|
ImmutableIntFloatMap |
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(int key,
float initialValueIfAbsent,
FloatToFloatFunction function) |
|
MutableFloatCollection |
values() |
|
IntFloatHashMap |
withKeysValues(int key1,
float value1,
int key2,
float value2) |
|
IntFloatHashMap |
withKeysValues(int key1,
float value1,
int key2,
float value2,
int key3,
float value3) |
|
IntFloatHashMap |
withKeysValues(int key1,
float value1,
int key2,
float value2,
int key3,
float value3,
int key4,
float value4) |
|
IntFloatHashMap |
withKeyValue(int key1,
float value1) |
|
IntFloatHashMap |
withoutAllKeys(IntIterable keys) |
|
IntFloatHashMap |
withoutKey(int 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, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListcontainsValue, forEachValue, tapisEmpty, notEmpty, sizecollect, reject, selectputPairappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic IntFloatHashMap()
public IntFloatHashMap(int initialCapacity)
public IntFloatHashMap(IntFloatMap map)
public static IntFloatHashMap newWithKeysValues(int key1, float value1)
public static IntFloatHashMap newWithKeysValues(int key1, float value1, int key2, float value2)
public static IntFloatHashMap newWithKeysValues(int key1, float value1, int key2, float value2, int key3, float value3)
public static IntFloatHashMap newWithKeysValues(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4)
public boolean equals(java.lang.Object obj)
IntFloatMapMap.equals(Object).equals in interface IntFloatMapequals in class java.lang.Objectpublic int hashCode()
IntFloatMapMap.hashCode().hashCode in interface IntFloatMaphashCode 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 IntFloatMaptoString 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 MutableIntKeysMappublic void put(int key,
float value)
put in interface MutableIntFloatMappublic void putAll(IntFloatMap map)
putAll in interface MutableIntFloatMappublic void removeKey(int key)
removeKey in interface MutableIntFloatMapremoveKey in interface MutableIntKeysMappublic void remove(int key)
remove in interface MutableIntFloatMappublic float removeKeyIfAbsent(int key,
float value)
removeKeyIfAbsent in interface MutableIntFloatMappublic float getIfAbsentPut(int key,
float value)
getIfAbsentPut in interface MutableIntFloatMappublic float getIfAbsentPut(int key,
FloatFunction0 function)
getIfAbsentPut in interface MutableIntFloatMappublic <P> float getIfAbsentPutWith(int key,
FloatFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntFloatMappublic float getIfAbsentPutWithKey(int key,
IntToFloatFunction function)
getIfAbsentPutWithKey in interface MutableIntFloatMappublic float addToValue(int key,
float toBeAdded)
addToValue in interface MutableIntFloatMappublic float updateValue(int key,
float initialValueIfAbsent,
FloatToFloatFunction function)
updateValue in interface MutableIntFloatMappublic IntFloatHashMap withKeyValue(int key1, float value1)
withKeyValue in interface MutableIntFloatMappublic IntFloatHashMap withKeysValues(int key1, float value1, int key2, float value2)
public IntFloatHashMap withKeysValues(int key1, float value1, int key2, float value2, int key3, float value3)
public IntFloatHashMap withKeysValues(int key1, float value1, int key2, float value2, int key3, float value3, int key4, float value4)
public IntFloatHashMap withoutKey(int key)
withoutKey in interface MutableIntFloatMappublic IntFloatHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntFloatMappublic MutableIntFloatMap asUnmodifiable()
asUnmodifiable in interface MutableIntFloatMappublic MutableIntFloatMap asSynchronized()
asSynchronized in interface MutableIntFloatMappublic ImmutableIntFloatMap toImmutable()
toImmutable in interface IntFloatMappublic float get(int key)
get in interface IntFloatMappublic float getIfAbsent(int key,
float ifAbsent)
getIfAbsent in interface IntFloatMappublic float getOrThrow(int key)
getOrThrow in interface IntFloatMappublic boolean containsKey(int key)
containsKey in interface IntFloatMapcontainsKey in interface IntKeysMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntFloatMapforEachKey in interface IntKeysMappublic void forEachKeyValue(IntFloatProcedure procedure)
forEachKeyValue in interface IntFloatMappublic LazyIntIterable keysView()
keysView in interface IntFloatMappublic RichIterable<IntFloatPair> keyValuesView()
keyValuesView in interface IntFloatMappublic MutableFloatIntMap flipUniqueValues()
IntFloatMapflipUniqueValues in interface IntFloatMapflipUniqueValues in interface MutableIntFloatMappublic IntFloatHashMap select(IntFloatPredicate predicate)
select in interface IntFloatMapselect in interface MutableIntFloatMappublic IntFloatHashMap reject(IntFloatPredicate predicate)
reject in interface IntFloatMapreject in interface MutableIntFloatMappublic 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 MutableIntSet keySet()
keySet in interface IntFloatMappublic MutableFloatCollection values()
values in interface FloatValuesMapCopyright © 2004–2018. All rights reserved.