Class FloatIntHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractIntIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.FloatIntHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,IntIterable
,FloatIntMap
,IntValuesMap
,MutableFloatIntMap
,MutableIntValuesMap
,PrimitiveIterable
,MutableFloatKeysMap
,FloatKeysMap
public class FloatIntHashMap extends AbstractMutableIntValuesMap implements MutableFloatIntMap, Externalizable, MutableFloatKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FloatIntHashMap()
FloatIntHashMap(int initialCapacity)
FloatIntHashMap(FloatIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
addToValue(float key, int toBeAdded)
MutableFloatIntMap
asSynchronized()
MutableFloatIntMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(float key)
boolean
equals(Object obj)
MutableIntFloatMap
flipUniqueValues()
void
forEachKey(FloatProcedure procedure)
void
forEachKeyValue(FloatIntProcedure procedure)
int
get(float key)
int
getAndPut(float key, int putValue, int defaultValue)
int
getIfAbsent(float key, int ifAbsent)
int
getIfAbsentPut(float key, int value)
int
getIfAbsentPut(float key, IntFunction0 function)
<P> int
getIfAbsentPutWith(float key, IntFunction<? super P> function, P parameter)
int
getIfAbsentPutWithKey(float key, FloatToIntFunction function)
int
getOrThrow(float key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
MutableIntIterator
intIterator()
MutableFloatSet
keySet()
LazyFloatIterable
keysView()
RichIterable<FloatIntPair>
keyValuesView()
static FloatIntHashMap
newWithKeysValues(float key1, int value1)
static FloatIntHashMap
newWithKeysValues(float key1, int value1, float key2, int value2)
static FloatIntHashMap
newWithKeysValues(float key1, int value1, float key2, int value2, float key3, int value3)
static FloatIntHashMap
newWithKeysValues(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4)
void
put(float key, int value)
void
putAll(FloatIntMap map)
void
readExternal(ObjectInput in)
FloatIntHashMap
reject(FloatIntPredicate predicate)
void
remove(float key)
void
removeKey(float key)
int
removeKeyIfAbsent(float key, int value)
FloatIntHashMap
select(FloatIntPredicate predicate)
ImmutableFloatIntMap
toImmutable()
String
toString()
boolean
trimToSize()
int
updateValue(float key, int initialValueIfAbsent, IntToIntFunction function)
void
updateValues(FloatIntToIntFunction function)
MutableIntCollection
values()
FloatIntHashMap
withKeysValues(float key1, int value1, float key2, int value2)
FloatIntHashMap
withKeysValues(float key1, int value1, float key2, int value2, float key3, int value3)
FloatIntHashMap
withKeysValues(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4)
FloatIntHashMap
withKeyValue(float key1, int value1)
FloatIntHashMap
withoutAllKeys(FloatIterable keys)
FloatIntHashMap
withoutKey(float key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.FloatIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.FloatKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableFloatIntMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
FloatIntHashMap
public FloatIntHashMap()
-
FloatIntHashMap
public FloatIntHashMap(int initialCapacity)
-
FloatIntHashMap
public FloatIntHashMap(FloatIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static FloatIntHashMap newWithKeysValues(float key1, int value1)
-
newWithKeysValues
public static FloatIntHashMap newWithKeysValues(float key1, int value1, float key2, int value2)
-
newWithKeysValues
public static FloatIntHashMap newWithKeysValues(float key1, int value1, float key2, int value2, float key3, int value3)
-
newWithKeysValues
public static FloatIntHashMap newWithKeysValues(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceFloatIntMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceFloatIntMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceFloatIntMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIterator
in interfaceIntIterable
- Specified by:
intIterator
in interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceIntIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableFloatKeysMap
- Specified by:
clear
in interfaceMutableIntValuesMap
-
put
public void put(float key, int value)
- Specified by:
put
in interfaceMutableFloatIntMap
-
putAll
public void putAll(FloatIntMap map)
- Specified by:
putAll
in interfaceMutableFloatIntMap
-
updateValues
public void updateValues(FloatIntToIntFunction function)
- Specified by:
updateValues
in interfaceMutableFloatIntMap
-
removeKey
public void removeKey(float key)
- Specified by:
removeKey
in interfaceMutableFloatIntMap
- Specified by:
removeKey
in interfaceMutableFloatKeysMap
-
remove
public void remove(float key)
- Specified by:
remove
in interfaceMutableFloatIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(float key, int value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableFloatIntMap
-
getIfAbsentPut
public int getIfAbsentPut(float key, int value)
- Specified by:
getIfAbsentPut
in interfaceMutableFloatIntMap
-
getAndPut
public int getAndPut(float key, int putValue, int defaultValue)
- Specified by:
getAndPut
in interfaceMutableFloatIntMap
-
getIfAbsentPut
public int getIfAbsentPut(float key, IntFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableFloatIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(float key, IntFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableFloatIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(float key, FloatToIntFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableFloatIntMap
-
addToValue
public int addToValue(float key, int toBeAdded)
- Specified by:
addToValue
in interfaceMutableFloatIntMap
-
updateValue
public int updateValue(float key, int initialValueIfAbsent, IntToIntFunction function)
- Specified by:
updateValue
in interfaceMutableFloatIntMap
-
withKeyValue
public FloatIntHashMap withKeyValue(float key1, int value1)
- Specified by:
withKeyValue
in interfaceMutableFloatIntMap
-
withKeysValues
public FloatIntHashMap withKeysValues(float key1, int value1, float key2, int value2)
-
withKeysValues
public FloatIntHashMap withKeysValues(float key1, int value1, float key2, int value2, float key3, int value3)
-
withKeysValues
public FloatIntHashMap withKeysValues(float key1, int value1, float key2, int value2, float key3, int value3, float key4, int value4)
-
withoutKey
public FloatIntHashMap withoutKey(float key)
- Specified by:
withoutKey
in interfaceMutableFloatIntMap
-
withoutAllKeys
public FloatIntHashMap withoutAllKeys(FloatIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableFloatIntMap
-
asUnmodifiable
public MutableFloatIntMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableFloatIntMap
-
asSynchronized
public MutableFloatIntMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableFloatIntMap
-
toImmutable
public ImmutableFloatIntMap toImmutable()
- Specified by:
toImmutable
in interfaceFloatIntMap
-
get
public int get(float key)
- Specified by:
get
in interfaceFloatIntMap
-
getIfAbsent
public int getIfAbsent(float key, int ifAbsent)
- Specified by:
getIfAbsent
in interfaceFloatIntMap
-
getOrThrow
public int getOrThrow(float key)
- Specified by:
getOrThrow
in interfaceFloatIntMap
-
containsKey
public boolean containsKey(float key)
- Specified by:
containsKey
in interfaceFloatIntMap
- Specified by:
containsKey
in interfaceFloatKeysMap
-
forEachKey
public void forEachKey(FloatProcedure procedure)
- Specified by:
forEachKey
in interfaceFloatIntMap
- Specified by:
forEachKey
in interfaceFloatKeysMap
-
forEachKeyValue
public void forEachKeyValue(FloatIntProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceFloatIntMap
-
keysView
public LazyFloatIterable keysView()
- Specified by:
keysView
in interfaceFloatIntMap
-
keyValuesView
public RichIterable<FloatIntPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceFloatIntMap
-
flipUniqueValues
public MutableIntFloatMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceFloatIntMap
- Specified by:
flipUniqueValues
in interfaceMutableFloatIntMap
-
select
public FloatIntHashMap select(FloatIntPredicate predicate)
- Specified by:
select
in interfaceFloatIntMap
- Specified by:
select
in interfaceMutableFloatIntMap
-
reject
public FloatIntHashMap reject(FloatIntPredicate predicate)
- Specified by:
reject
in interfaceFloatIntMap
- Specified by:
reject
in interfaceMutableFloatIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
keySet
public MutableFloatSet keySet()
- Specified by:
keySet
in interfaceFloatIntMap
-
values
public MutableIntCollection values()
- Specified by:
values
in interfaceIntValuesMap
-
-