Class ObjectFloatHashMap<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.ObjectFloatHashMap<K>
-
- All Implemented Interfaces:
Externalizable,Serializable,FloatIterable,MutableObjectFloatMap<K>,ObjectFloatMap<K>,PrimitiveIterable
public class ObjectFloatHashMap<K> extends Object implements MutableObjectFloatMap<K>, Externalizable
This file was automatically generated from template file objectPrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static floatEMPTY_VALUE
-
Constructor Summary
Constructors Constructor Description ObjectFloatHashMap()ObjectFloatHashMap(int initialCapacity)ObjectFloatHashMap(ObjectFloatMap<? extends K> map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description floataddToValue(K key, float toBeAdded)booleanallSatisfy(FloatPredicate predicate)booleananySatisfy(FloatPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyFloatIterableasLazy()MutableObjectFloatMap<K>asSynchronized()MutableObjectFloatMap<K>asUnmodifiable()doubleaverage()RichIterable<FloatIterable>chunk(int size)voidclear()<V> MutableCollection<V>collect(FloatToObjectFunction<? extends V> function)voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontains(float value)booleancontainsAll(float... source)booleancontainsAll(FloatIterable source)booleancontainsKey(Object key)booleancontainsValue(float value)intcount(FloatPredicate predicate)floatdetectIfNone(FloatPredicate predicate, float ifNone)voideach(FloatProcedure procedure)booleanequals(Object obj)MutableFloatObjectMap<K>flipUniqueValues()MutableFloatIteratorfloatIterator()voidforEachKey(Procedure<? super K> procedure)voidforEachKeyValue(ObjectFloatProcedure<? super K> procedure)voidforEachValue(FloatProcedure procedure)floatget(Object key)floatgetAndPut(K key, float putValue, float defaultValue)floatgetIfAbsent(Object key, float ifAbsent)floatgetIfAbsentPut(K key, float value)floatgetIfAbsentPut(K key, FloatFunction0 function)<P> floatgetIfAbsentPutWith(K key, FloatFunction<? super P> function, P parameter)floatgetIfAbsentPutWithKey(K key, FloatFunction<? super K> function)floatgetOrThrow(Object key)inthashCode()<V> VinjectInto(V injectedValue, ObjectFloatToObjectFunction<? super V,? extends V> function)booleanisEmpty()Set<K>keySet()LazyIterable<K>keysView()RichIterable<ObjectFloatPair<K>>keyValuesView()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)floatmax()floatmaxIfEmpty(float defaultValue)doublemedian()floatmin()floatminIfEmpty(float defaultValue)static <K> ObjectFloatHashMap<K>newMap()static <K> ObjectFloatHashMap<K>newWithKeysValues(K key1, float value1)static <K> ObjectFloatHashMap<K>newWithKeysValues(K key1, float value1, K key2, float value2)static <K> ObjectFloatHashMap<K>newWithKeysValues(K key1, float value1, K key2, float value2, K key3, float value3)static <K> ObjectFloatHashMap<K>newWithKeysValues(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4)booleannoneSatisfy(FloatPredicate predicate)booleannotEmpty()voidput(K key, float value)voidputAll(ObjectFloatMap<? extends K> map)voidreadExternal(ObjectInput in)MutableFloatCollectionreject(FloatPredicate predicate)ObjectFloatHashMap<K>reject(ObjectFloatPredicate<? super K> predicate)voidremove(Object key)voidremoveKey(K key)floatremoveKeyIfAbsent(K key, float value)MutableFloatCollectionselect(FloatPredicate predicate)ObjectFloatHashMap<K>select(ObjectFloatPredicate<? super K> predicate)intsize()doublesum()float[]toArray()float[]toArray(float[] target)MutableFloatBagtoBag()ImmutableObjectFloatMap<K>toImmutable()MutableFloatListtoList()MutableFloatSettoSet()float[]toSortedArray()MutableFloatListtoSortedList()StringtoString()booleantrimToSize()floatupdateValue(K key, float initialValueIfAbsent, FloatToFloatFunction function)voidupdateValues(ObjectFloatToFloatFunction<? super K> function)MutableFloatCollectionvalues()ObjectFloatHashMap<K>withKeysValues(K key1, float value1, K key2, float value2)ObjectFloatHashMap<K>withKeysValues(K key1, float value1, K key2, float value2, K key3, float value3)ObjectFloatHashMap<K>withKeysValues(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4)ObjectFloatHashMap<K>withKeyValue(K key1, float value1)ObjectFloatHashMap<K>withoutAllKeys(Iterable<? extends K> keys)ObjectFloatHashMap<K>withoutKey(K key)voidwriteExternal(ObjectOutput out)-
Methods inherited from interface org.eclipse.collections.api.FloatIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectFloatMap
putPair, tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectFloatMap
injectIntoKeyValue
-
-
-
-
Field Detail
-
EMPTY_VALUE
public static final float EMPTY_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectFloatHashMap
public ObjectFloatHashMap()
-
ObjectFloatHashMap
public ObjectFloatHashMap(int initialCapacity)
-
ObjectFloatHashMap
public ObjectFloatHashMap(ObjectFloatMap<? extends K> map)
-
-
Method Detail
-
newMap
public static <K> ObjectFloatHashMap<K> newMap()
-
newWithKeysValues
public static <K> ObjectFloatHashMap<K> newWithKeysValues(K key1, float value1)
-
newWithKeysValues
public static <K> ObjectFloatHashMap<K> newWithKeysValues(K key1, float value1, K key2, float value2)
-
newWithKeysValues
public static <K> ObjectFloatHashMap<K> newWithKeysValues(K key1, float value1, K key2, float value2, K key3, float value3)
-
newWithKeysValues
public static <K> ObjectFloatHashMap<K> newWithKeysValues(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4)
-
toString
public String toString()
- Specified by:
toStringin interfaceObjectFloatMap<K>- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
floatIterator
public MutableFloatIterator floatIterator()
- Specified by:
floatIteratorin interfaceFloatIterable- Specified by:
floatIteratorin interfaceMutableObjectFloatMap<K>
-
toArray
public float[] toArray()
- Specified by:
toArrayin interfaceFloatIterable
-
toArray
public float[] toArray(float[] target)
- Specified by:
toArrayin interfaceFloatIterable
-
contains
public boolean contains(float value)
- Specified by:
containsin interfaceFloatIterable
-
containsAll
public boolean containsAll(float... source)
- Specified by:
containsAllin interfaceFloatIterable
-
containsAll
public boolean containsAll(FloatIterable source)
- Specified by:
containsAllin interfaceFloatIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableObjectFloatMap<K>
-
put
public void put(K key, float value)
- Specified by:
putin interfaceMutableObjectFloatMap<K>
-
putAll
public void putAll(ObjectFloatMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectFloatMap<K>
-
updateValues
public void updateValues(ObjectFloatToFloatFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectFloatMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectFloatMap<K>
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectFloatMap<K>
-
removeKeyIfAbsent
public float removeKeyIfAbsent(K key, float value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectFloatMap<K>
-
getIfAbsentPut
public float getIfAbsentPut(K key, float value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectFloatMap<K>
-
getAndPut
public float getAndPut(K key, float putValue, float defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectFloatMap<K>
-
getIfAbsentPut
public float getIfAbsentPut(K key, FloatFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectFloatMap<K>
-
getIfAbsentPutWith
public <P> float getIfAbsentPutWith(K key, FloatFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectFloatMap<K>
-
getIfAbsentPutWithKey
public float getIfAbsentPutWithKey(K key, FloatFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectFloatMap<K>
-
updateValue
public float updateValue(K key, float initialValueIfAbsent, FloatToFloatFunction function)
- Specified by:
updateValuein interfaceMutableObjectFloatMap<K>
-
addToValue
public float addToValue(K key, float toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectFloatMap<K>
-
withKeyValue
public ObjectFloatHashMap<K> withKeyValue(K key1, float value1)
- Specified by:
withKeyValuein interfaceMutableObjectFloatMap<K>
-
withKeysValues
public ObjectFloatHashMap<K> withKeysValues(K key1, float value1, K key2, float value2)
-
withKeysValues
public ObjectFloatHashMap<K> withKeysValues(K key1, float value1, K key2, float value2, K key3, float value3)
-
withKeysValues
public ObjectFloatHashMap<K> withKeysValues(K key1, float value1, K key2, float value2, K key3, float value3, K key4, float value4)
-
withoutKey
public ObjectFloatHashMap<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectFloatMap<K>
-
withoutAllKeys
public ObjectFloatHashMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectFloatMap<K>
-
asUnmodifiable
public MutableObjectFloatMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectFloatMap<K>
-
asSynchronized
public MutableObjectFloatMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectFloatMap<K>
-
toImmutable
public ImmutableObjectFloatMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectFloatMap<K>
-
get
public float get(Object key)
- Specified by:
getin interfaceObjectFloatMap<K>
-
getOrThrow
public float getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectFloatMap<K>
-
getIfAbsent
public float getIfAbsent(Object key, float ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectFloatMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectFloatMap<K>
-
containsValue
public boolean containsValue(float value)
- Specified by:
containsValuein interfaceObjectFloatMap<K>
-
each
public void each(FloatProcedure procedure)
- Specified by:
eachin interfaceFloatIterable- Since:
- 7.0.
-
forEachValue
public void forEachValue(FloatProcedure procedure)
- Specified by:
forEachValuein interfaceObjectFloatMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectFloatMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectFloatProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectFloatMap<K>
-
select
public ObjectFloatHashMap<K> select(ObjectFloatPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectFloatMap<K>- Specified by:
selectin interfaceObjectFloatMap<K>
-
reject
public ObjectFloatHashMap<K> reject(ObjectFloatPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectFloatMap<K>- Specified by:
rejectin interfaceObjectFloatMap<K>
-
select
public MutableFloatCollection select(FloatPredicate predicate)
- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceMutableObjectFloatMap<K>
-
reject
public MutableFloatCollection reject(FloatPredicate predicate)
- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceMutableObjectFloatMap<K>
-
detectIfNone
public float detectIfNone(FloatPredicate predicate, float ifNone)
- Specified by:
detectIfNonein interfaceFloatIterable
-
collect
public <V> MutableCollection<V> collect(FloatToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceMutableObjectFloatMap<K>
-
count
public int count(FloatPredicate predicate)
- Specified by:
countin interfaceFloatIterable
-
anySatisfy
public boolean anySatisfy(FloatPredicate predicate)
- Specified by:
anySatisfyin interfaceFloatIterable
-
allSatisfy
public boolean allSatisfy(FloatPredicate predicate)
- Specified by:
allSatisfyin interfaceFloatIterable
-
noneSatisfy
public boolean noneSatisfy(FloatPredicate predicate)
- Specified by:
noneSatisfyin interfaceFloatIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectFloatToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceFloatIterable
-
chunk
public RichIterable<FloatIterable> chunk(int size)
- Specified by:
chunkin interfaceFloatIterable
-
sum
public double sum()
- Specified by:
sumin interfaceFloatIterable
-
max
public float max()
- Specified by:
maxin interfaceFloatIterable
-
min
public float min()
- Specified by:
minin interfaceFloatIterable
-
maxIfEmpty
public float maxIfEmpty(float defaultValue)
- Specified by:
maxIfEmptyin interfaceFloatIterable
-
minIfEmpty
public float minIfEmpty(float defaultValue)
- Specified by:
minIfEmptyin interfaceFloatIterable
-
average
public double average()
- Specified by:
averagein interfaceFloatIterable
-
median
public double median()
- Specified by:
medianin interfaceFloatIterable
-
toList
public MutableFloatList toList()
- Specified by:
toListin interfaceFloatIterable
-
toSet
public MutableFloatSet toSet()
- Specified by:
toSetin interfaceFloatIterable
-
toBag
public MutableFloatBag toBag()
- Specified by:
toBagin interfaceFloatIterable
-
asLazy
public LazyFloatIterable asLazy()
- Specified by:
asLazyin interfaceFloatIterable
-
toSortedArray
public float[] toSortedArray()
- Specified by:
toSortedArrayin interfaceFloatIterable
-
toSortedList
public MutableFloatList toSortedList()
- Specified by:
toSortedListin interfaceFloatIterable
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysViewin interfaceObjectFloatMap<K>
-
keyValuesView
public RichIterable<ObjectFloatPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectFloatMap<K>
-
flipUniqueValues
public MutableFloatObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectFloatMap<K>- Specified by:
flipUniqueValuesin interfaceObjectFloatMap<K>
-
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 Set<K> keySet()
- Specified by:
keySetin interfaceObjectFloatMap<K>
-
values
public MutableFloatCollection values()
- Specified by:
valuesin interfaceObjectFloatMap<K>
-
-