Class CharFloatHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractFloatIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableFloatValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.CharFloatHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,FloatIterable
,CharFloatMap
,FloatValuesMap
,MutableCharFloatMap
,MutableFloatValuesMap
,PrimitiveIterable
,MutableCharKeysMap
,CharKeysMap
public class CharFloatHashMap extends AbstractMutableFloatValuesMap implements MutableCharFloatMap, Externalizable, MutableCharKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CharFloatHashMap()
CharFloatHashMap(int initialCapacity)
CharFloatHashMap(CharFloatMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description float
addToValue(char key, float toBeAdded)
MutableCharFloatMap
asSynchronized()
MutableCharFloatMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(char key)
boolean
equals(Object obj)
MutableFloatCharMap
flipUniqueValues()
MutableFloatIterator
floatIterator()
void
forEachKey(CharProcedure procedure)
void
forEachKeyValue(CharFloatProcedure procedure)
float
get(char key)
float
getAndPut(char key, float putValue, float defaultValue)
float
getIfAbsent(char key, float ifAbsent)
float
getIfAbsentPut(char key, float value)
float
getIfAbsentPut(char key, FloatFunction0 function)
<P> float
getIfAbsentPutWith(char key, FloatFunction<? super P> function, P parameter)
float
getIfAbsentPutWithKey(char key, CharToFloatFunction function)
float
getOrThrow(char key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectFloatToObjectFunction<? super V,? extends V> function)
MutableCharSet
keySet()
LazyCharIterable
keysView()
RichIterable<CharFloatPair>
keyValuesView()
static CharFloatHashMap
newWithKeysValues(char key1, float value1)
static CharFloatHashMap
newWithKeysValues(char key1, float value1, char key2, float value2)
static CharFloatHashMap
newWithKeysValues(char key1, float value1, char key2, float value2, char key3, float value3)
static CharFloatHashMap
newWithKeysValues(char key1, float value1, char key2, float value2, char key3, float value3, char key4, float value4)
void
put(char key, float value)
void
putAll(CharFloatMap map)
void
readExternal(ObjectInput in)
CharFloatHashMap
reject(CharFloatPredicate predicate)
void
remove(char key)
void
removeKey(char key)
float
removeKeyIfAbsent(char key, float value)
CharFloatHashMap
select(CharFloatPredicate predicate)
ImmutableCharFloatMap
toImmutable()
String
toString()
boolean
trimToSize()
float
updateValue(char key, float initialValueIfAbsent, FloatToFloatFunction function)
void
updateValues(CharFloatToFloatFunction function)
MutableFloatCollection
values()
CharFloatHashMap
withKeysValues(char key1, float value1, char key2, float value2)
CharFloatHashMap
withKeysValues(char key1, float value1, char key2, float value2, char key3, float value3)
CharFloatHashMap
withKeysValues(char key1, float value1, char key2, float value2, char key3, float value3, char key4, float value4)
CharFloatHashMap
withKeyValue(char key1, float value1)
CharFloatHashMap
withoutAllKeys(CharIterable keys)
CharFloatHashMap
withoutKey(char 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.map.primitive.CharFloatMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.CharKeysMap
isEmpty, notEmpty, size
-
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.MutableCharFloatMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableFloatValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
CharFloatHashMap
public CharFloatHashMap()
-
CharFloatHashMap
public CharFloatHashMap(int initialCapacity)
-
CharFloatHashMap
public CharFloatHashMap(CharFloatMap map)
-
-
Method Detail
-
newWithKeysValues
public static CharFloatHashMap newWithKeysValues(char key1, float value1)
-
newWithKeysValues
public static CharFloatHashMap newWithKeysValues(char key1, float value1, char key2, float value2)
-
newWithKeysValues
public static CharFloatHashMap newWithKeysValues(char key1, float value1, char key2, float value2, char key3, float value3)
-
newWithKeysValues
public static CharFloatHashMap newWithKeysValues(char key1, float value1, char key2, float value2, char key3, float value3, char key4, float value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceCharFloatMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCharFloatMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceCharFloatMap
- Specified by:
toString
in interfacePrimitiveIterable
- 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 interfaceMutableCharKeysMap
- Specified by:
clear
in interfaceMutableFloatValuesMap
-
put
public void put(char key, float value)
- Specified by:
put
in interfaceMutableCharFloatMap
-
putAll
public void putAll(CharFloatMap map)
- Specified by:
putAll
in interfaceMutableCharFloatMap
-
updateValues
public void updateValues(CharFloatToFloatFunction function)
- Specified by:
updateValues
in interfaceMutableCharFloatMap
-
removeKey
public void removeKey(char key)
- Specified by:
removeKey
in interfaceMutableCharFloatMap
- Specified by:
removeKey
in interfaceMutableCharKeysMap
-
remove
public void remove(char key)
- Specified by:
remove
in interfaceMutableCharFloatMap
-
removeKeyIfAbsent
public float removeKeyIfAbsent(char key, float value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableCharFloatMap
-
getIfAbsentPut
public float getIfAbsentPut(char key, float value)
- Specified by:
getIfAbsentPut
in interfaceMutableCharFloatMap
-
getAndPut
public float getAndPut(char key, float putValue, float defaultValue)
- Specified by:
getAndPut
in interfaceMutableCharFloatMap
-
getIfAbsentPut
public float getIfAbsentPut(char key, FloatFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableCharFloatMap
-
getIfAbsentPutWith
public <P> float getIfAbsentPutWith(char key, FloatFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableCharFloatMap
-
getIfAbsentPutWithKey
public float getIfAbsentPutWithKey(char key, CharToFloatFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableCharFloatMap
-
addToValue
public float addToValue(char key, float toBeAdded)
- Specified by:
addToValue
in interfaceMutableCharFloatMap
-
updateValue
public float updateValue(char key, float initialValueIfAbsent, FloatToFloatFunction function)
- Specified by:
updateValue
in interfaceMutableCharFloatMap
-
withKeyValue
public CharFloatHashMap withKeyValue(char key1, float value1)
- Specified by:
withKeyValue
in interfaceMutableCharFloatMap
-
withKeysValues
public CharFloatHashMap withKeysValues(char key1, float value1, char key2, float value2)
-
withKeysValues
public CharFloatHashMap withKeysValues(char key1, float value1, char key2, float value2, char key3, float value3)
-
withKeysValues
public CharFloatHashMap withKeysValues(char key1, float value1, char key2, float value2, char key3, float value3, char key4, float value4)
-
withoutKey
public CharFloatHashMap withoutKey(char key)
- Specified by:
withoutKey
in interfaceMutableCharFloatMap
-
withoutAllKeys
public CharFloatHashMap withoutAllKeys(CharIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableCharFloatMap
-
asUnmodifiable
public MutableCharFloatMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharFloatMap
-
asSynchronized
public MutableCharFloatMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharFloatMap
-
toImmutable
public ImmutableCharFloatMap toImmutable()
- Specified by:
toImmutable
in interfaceCharFloatMap
-
get
public float get(char key)
- Specified by:
get
in interfaceCharFloatMap
-
getIfAbsent
public float getIfAbsent(char key, float ifAbsent)
- Specified by:
getIfAbsent
in interfaceCharFloatMap
-
getOrThrow
public float getOrThrow(char key)
- Specified by:
getOrThrow
in interfaceCharFloatMap
-
containsKey
public boolean containsKey(char key)
- Specified by:
containsKey
in interfaceCharFloatMap
- Specified by:
containsKey
in interfaceCharKeysMap
-
forEachKey
public void forEachKey(CharProcedure procedure)
- Specified by:
forEachKey
in interfaceCharFloatMap
- Specified by:
forEachKey
in interfaceCharKeysMap
-
forEachKeyValue
public void forEachKeyValue(CharFloatProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceCharFloatMap
-
keysView
public LazyCharIterable keysView()
- Specified by:
keysView
in interfaceCharFloatMap
-
keyValuesView
public RichIterable<CharFloatPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceCharFloatMap
-
flipUniqueValues
public MutableFloatCharMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceCharFloatMap
- Specified by:
flipUniqueValues
in interfaceMutableCharFloatMap
-
select
public CharFloatHashMap select(CharFloatPredicate predicate)
- Specified by:
select
in interfaceCharFloatMap
- Specified by:
select
in interfaceMutableCharFloatMap
-
reject
public CharFloatHashMap reject(CharFloatPredicate predicate)
- Specified by:
reject
in interfaceCharFloatMap
- Specified by:
reject
in interfaceMutableCharFloatMap
-
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 MutableCharSet keySet()
- Specified by:
keySet
in interfaceCharFloatMap
-
values
public MutableFloatCollection values()
- Specified by:
values
in interfaceFloatValuesMap
-
-