Class ShortFloatHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractFloatIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableFloatValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ShortFloatHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,FloatIterable
,FloatValuesMap
,MutableFloatValuesMap
,MutableShortFloatMap
,ShortFloatMap
,PrimitiveIterable
,MutableShortKeysMap
,ShortKeysMap
public class ShortFloatHashMap extends AbstractMutableFloatValuesMap implements MutableShortFloatMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortFloatHashMap()
ShortFloatHashMap(int initialCapacity)
ShortFloatHashMap(ShortFloatMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description float
addToValue(short key, float toBeAdded)
MutableShortFloatMap
asSynchronized()
MutableShortFloatMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(short key)
boolean
equals(Object obj)
MutableFloatShortMap
flipUniqueValues()
MutableFloatIterator
floatIterator()
void
forEachKey(ShortProcedure procedure)
void
forEachKeyValue(ShortFloatProcedure procedure)
float
get(short key)
float
getAndPut(short key, float putValue, float defaultValue)
float
getIfAbsent(short key, float ifAbsent)
float
getIfAbsentPut(short key, float value)
float
getIfAbsentPut(short key, FloatFunction0 function)
<P> float
getIfAbsentPutWith(short key, FloatFunction<? super P> function, P parameter)
float
getIfAbsentPutWithKey(short key, ShortToFloatFunction function)
float
getOrThrow(short key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectFloatToObjectFunction<? super V,? extends V> function)
MutableShortSet
keySet()
LazyShortIterable
keysView()
RichIterable<ShortFloatPair>
keyValuesView()
static ShortFloatHashMap
newWithKeysValues(short key1, float value1)
static ShortFloatHashMap
newWithKeysValues(short key1, float value1, short key2, float value2)
static ShortFloatHashMap
newWithKeysValues(short key1, float value1, short key2, float value2, short key3, float value3)
static ShortFloatHashMap
newWithKeysValues(short key1, float value1, short key2, float value2, short key3, float value3, short key4, float value4)
void
put(short key, float value)
void
putAll(ShortFloatMap map)
void
readExternal(ObjectInput in)
ShortFloatHashMap
reject(ShortFloatPredicate predicate)
void
remove(short key)
void
removeKey(short key)
float
removeKeyIfAbsent(short key, float value)
ShortFloatHashMap
select(ShortFloatPredicate predicate)
ImmutableShortFloatMap
toImmutable()
String
toString()
boolean
trimToSize()
float
updateValue(short key, float initialValueIfAbsent, FloatToFloatFunction function)
void
updateValues(ShortFloatToFloatFunction function)
MutableFloatCollection
values()
ShortFloatHashMap
withKeysValues(short key1, float value1, short key2, float value2)
ShortFloatHashMap
withKeysValues(short key1, float value1, short key2, float value2, short key3, float value3)
ShortFloatHashMap
withKeysValues(short key1, float value1, short key2, float value2, short key3, float value3, short key4, float value4)
ShortFloatHashMap
withKeyValue(short key1, float value1)
ShortFloatHashMap
withoutAllKeys(ShortIterable keys)
ShortFloatHashMap
withoutKey(short key)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableFloatValuesMap
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.AbstractFloatIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.FloatIterable
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.FloatValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableFloatValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortFloatMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortFloatMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
-
-
-
Constructor Detail
-
ShortFloatHashMap
public ShortFloatHashMap()
-
ShortFloatHashMap
public ShortFloatHashMap(int initialCapacity)
-
ShortFloatHashMap
public ShortFloatHashMap(ShortFloatMap map)
-
-
Method Detail
-
newWithKeysValues
public static ShortFloatHashMap newWithKeysValues(short key1, float value1)
-
newWithKeysValues
public static ShortFloatHashMap newWithKeysValues(short key1, float value1, short key2, float value2)
-
newWithKeysValues
public static ShortFloatHashMap newWithKeysValues(short key1, float value1, short key2, float value2, short key3, float value3)
-
newWithKeysValues
public static ShortFloatHashMap newWithKeysValues(short key1, float value1, short key2, float value2, short key3, float value3, short key4, float value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceShortFloatMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceShortFloatMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Specified by:
toString
in interfaceShortFloatMap
- Overrides:
toString
in classAbstractFloatIterable
-
floatIterator
public MutableFloatIterator floatIterator()
- Specified by:
floatIterator
in interfaceFloatIterable
- Specified by:
floatIterator
in interfaceMutableFloatValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectFloatToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceFloatIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableFloatValuesMap
- Specified by:
clear
in interfaceMutableShortKeysMap
-
put
public void put(short key, float value)
- Specified by:
put
in interfaceMutableShortFloatMap
-
putAll
public void putAll(ShortFloatMap map)
- Specified by:
putAll
in interfaceMutableShortFloatMap
-
updateValues
public void updateValues(ShortFloatToFloatFunction function)
- Specified by:
updateValues
in interfaceMutableShortFloatMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKey
in interfaceMutableShortFloatMap
- Specified by:
removeKey
in interfaceMutableShortKeysMap
-
remove
public void remove(short key)
- Specified by:
remove
in interfaceMutableShortFloatMap
-
removeKeyIfAbsent
public float removeKeyIfAbsent(short key, float value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableShortFloatMap
-
getIfAbsentPut
public float getIfAbsentPut(short key, float value)
- Specified by:
getIfAbsentPut
in interfaceMutableShortFloatMap
-
getAndPut
public float getAndPut(short key, float putValue, float defaultValue)
- Specified by:
getAndPut
in interfaceMutableShortFloatMap
-
getIfAbsentPut
public float getIfAbsentPut(short key, FloatFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableShortFloatMap
-
getIfAbsentPutWith
public <P> float getIfAbsentPutWith(short key, FloatFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableShortFloatMap
-
getIfAbsentPutWithKey
public float getIfAbsentPutWithKey(short key, ShortToFloatFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableShortFloatMap
-
addToValue
public float addToValue(short key, float toBeAdded)
- Specified by:
addToValue
in interfaceMutableShortFloatMap
-
updateValue
public float updateValue(short key, float initialValueIfAbsent, FloatToFloatFunction function)
- Specified by:
updateValue
in interfaceMutableShortFloatMap
-
withKeyValue
public ShortFloatHashMap withKeyValue(short key1, float value1)
- Specified by:
withKeyValue
in interfaceMutableShortFloatMap
-
withKeysValues
public ShortFloatHashMap withKeysValues(short key1, float value1, short key2, float value2)
-
withKeysValues
public ShortFloatHashMap withKeysValues(short key1, float value1, short key2, float value2, short key3, float value3)
-
withKeysValues
public ShortFloatHashMap withKeysValues(short key1, float value1, short key2, float value2, short key3, float value3, short key4, float value4)
-
withoutKey
public ShortFloatHashMap withoutKey(short key)
- Specified by:
withoutKey
in interfaceMutableShortFloatMap
-
withoutAllKeys
public ShortFloatHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableShortFloatMap
-
asUnmodifiable
public MutableShortFloatMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableShortFloatMap
-
asSynchronized
public MutableShortFloatMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableShortFloatMap
-
toImmutable
public ImmutableShortFloatMap toImmutable()
- Specified by:
toImmutable
in interfaceShortFloatMap
-
get
public float get(short key)
- Specified by:
get
in interfaceShortFloatMap
-
getIfAbsent
public float getIfAbsent(short key, float ifAbsent)
- Specified by:
getIfAbsent
in interfaceShortFloatMap
-
getOrThrow
public float getOrThrow(short key)
- Specified by:
getOrThrow
in interfaceShortFloatMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKey
in interfaceShortFloatMap
- Specified by:
containsKey
in interfaceShortKeysMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKey
in interfaceShortFloatMap
- Specified by:
forEachKey
in interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortFloatProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceShortFloatMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysView
in interfaceShortFloatMap
-
keyValuesView
public RichIterable<ShortFloatPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceShortFloatMap
-
flipUniqueValues
public MutableFloatShortMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceMutableShortFloatMap
- Specified by:
flipUniqueValues
in interfaceShortFloatMap
-
select
public ShortFloatHashMap select(ShortFloatPredicate predicate)
- Specified by:
select
in interfaceMutableShortFloatMap
- Specified by:
select
in interfaceShortFloatMap
-
reject
public ShortFloatHashMap reject(ShortFloatPredicate predicate)
- Specified by:
reject
in interfaceMutableShortFloatMap
- Specified by:
reject
in interfaceShortFloatMap
-
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 MutableShortSet keySet()
- Specified by:
keySet
in interfaceShortFloatMap
-
values
public MutableFloatCollection values()
- Specified by:
values
in interfaceFloatValuesMap
-
-