java.io.Externalizable
, java.io.Serializable
, FloatIterable
, FloatValuesMap
, IntFloatMap
, MutableFloatValuesMap
, MutableIntFloatMap
, PrimitiveIterable
, MutableIntKeysMap
, IntKeysMap
public 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, toSortedList
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
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
isEmpty, notEmpty, size
collect, reject, select
putPair
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public 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)
IntFloatMap
Map.equals(Object)
.equals
in interface IntFloatMap
equals
in class java.lang.Object
public int hashCode()
IntFloatMap
Map.hashCode()
.hashCode
in interface IntFloatMap
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 IntFloatMap
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 MutableIntKeysMap
public void put(int key, float value)
put
in interface MutableIntFloatMap
public void putAll(IntFloatMap map)
putAll
in interface MutableIntFloatMap
public void removeKey(int key)
removeKey
in interface MutableIntFloatMap
removeKey
in interface MutableIntKeysMap
public void remove(int key)
remove
in interface MutableIntFloatMap
public float removeKeyIfAbsent(int key, float value)
removeKeyIfAbsent
in interface MutableIntFloatMap
public float getIfAbsentPut(int key, float value)
getIfAbsentPut
in interface MutableIntFloatMap
public float getIfAbsentPut(int key, FloatFunction0 function)
getIfAbsentPut
in interface MutableIntFloatMap
public <P> float getIfAbsentPutWith(int key, FloatFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableIntFloatMap
public float getIfAbsentPutWithKey(int key, IntToFloatFunction function)
getIfAbsentPutWithKey
in interface MutableIntFloatMap
public float addToValue(int key, float toBeAdded)
addToValue
in interface MutableIntFloatMap
public float updateValue(int key, float initialValueIfAbsent, FloatToFloatFunction function)
updateValue
in interface MutableIntFloatMap
public IntFloatHashMap withKeyValue(int key1, float value1)
withKeyValue
in interface MutableIntFloatMap
public 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 MutableIntFloatMap
public IntFloatHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys
in interface MutableIntFloatMap
public MutableIntFloatMap asUnmodifiable()
asUnmodifiable
in interface MutableIntFloatMap
public MutableIntFloatMap asSynchronized()
asSynchronized
in interface MutableIntFloatMap
public ImmutableIntFloatMap toImmutable()
toImmutable
in interface IntFloatMap
public float get(int key)
get
in interface IntFloatMap
public float getIfAbsent(int key, float ifAbsent)
getIfAbsent
in interface IntFloatMap
public float getOrThrow(int key)
getOrThrow
in interface IntFloatMap
public boolean containsKey(int key)
containsKey
in interface IntFloatMap
containsKey
in interface IntKeysMap
public void forEachKey(IntProcedure procedure)
forEachKey
in interface IntFloatMap
forEachKey
in interface IntKeysMap
public void forEachKeyValue(IntFloatProcedure procedure)
forEachKeyValue
in interface IntFloatMap
public LazyIntIterable keysView()
keysView
in interface IntFloatMap
public RichIterable<IntFloatPair> keyValuesView()
keyValuesView
in interface IntFloatMap
public MutableFloatIntMap flipUniqueValues()
IntFloatMap
flipUniqueValues
in interface IntFloatMap
flipUniqueValues
in interface MutableIntFloatMap
public IntFloatHashMap select(IntFloatPredicate predicate)
select
in interface IntFloatMap
select
in interface MutableIntFloatMap
public IntFloatHashMap reject(IntFloatPredicate predicate)
reject
in interface IntFloatMap
reject
in interface MutableIntFloatMap
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 MutableIntSet keySet()
keySet
in interface IntFloatMap
public MutableFloatCollection values()
values
in interface FloatValuesMap
Copyright © 2004–2018. All rights reserved.