Class IntDoubleHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractDoubleIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableDoubleValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.IntDoubleHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,DoubleIterable,DoubleValuesMap,IntDoubleMap,MutableDoubleValuesMap,MutableIntDoubleMap,PrimitiveIterable,MutableIntKeysMap,IntKeysMap
public class IntDoubleHashMap extends AbstractMutableDoubleValuesMap implements MutableIntDoubleMap, Externalizable, MutableIntKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntDoubleHashMap()IntDoubleHashMap(int initialCapacity)IntDoubleHashMap(IntDoubleMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description doubleaddToValue(int key, double toBeAdded)MutableIntDoubleMapasSynchronized()MutableIntDoubleMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(int key)MutableDoubleIteratordoubleIterator()booleanequals(Object obj)MutableDoubleIntMapflipUniqueValues()voidforEachKey(IntProcedure procedure)voidforEachKeyValue(IntDoubleProcedure procedure)doubleget(int key)doublegetAndPut(int key, double putValue, double defaultValue)doublegetIfAbsent(int key, double ifAbsent)doublegetIfAbsentPut(int key, double value)doublegetIfAbsentPut(int key, DoubleFunction0 function)<P> doublegetIfAbsentPutWith(int key, DoubleFunction<? super P> function, P parameter)doublegetIfAbsentPutWithKey(int key, IntToDoubleFunction function)doublegetOrThrow(int key)inthashCode()<V> VinjectInto(V injectedValue, ObjectDoubleToObjectFunction<? super V,? extends V> function)MutableIntSetkeySet()LazyIntIterablekeysView()RichIterable<IntDoublePair>keyValuesView()static IntDoubleHashMapnewWithKeysValues(int key1, double value1)static IntDoubleHashMapnewWithKeysValues(int key1, double value1, int key2, double value2)static IntDoubleHashMapnewWithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3)static IntDoubleHashMapnewWithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3, int key4, double value4)voidput(int key, double value)voidputAll(IntDoubleMap map)voidreadExternal(ObjectInput in)IntDoubleHashMapreject(IntDoublePredicate predicate)voidremove(int key)voidremoveKey(int key)doubleremoveKeyIfAbsent(int key, double value)IntDoubleHashMapselect(IntDoublePredicate predicate)ImmutableIntDoubleMaptoImmutable()StringtoString()booleantrimToSize()doubleupdateValue(int key, double initialValueIfAbsent, DoubleToDoubleFunction function)voidupdateValues(IntDoubleToDoubleFunction function)MutableDoubleCollectionvalues()IntDoubleHashMapwithKeysValues(int key1, double value1, int key2, double value2)IntDoubleHashMapwithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3)IntDoubleHashMapwithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3, int key4, double value4)IntDoubleHashMapwithKeyValue(int key1, double value1)IntDoubleHashMapwithoutAllKeys(IntIterable keys)IntDoubleHashMapwithoutKey(int key)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableDoubleValuesMap
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.AbstractDoubleIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
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.DoubleValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntDoubleMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.IntKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableDoubleValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntDoubleMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
IntDoubleHashMap
public IntDoubleHashMap()
-
IntDoubleHashMap
public IntDoubleHashMap(int initialCapacity)
-
IntDoubleHashMap
public IntDoubleHashMap(IntDoubleMap map)
-
-
Method Detail
-
newWithKeysValues
public static IntDoubleHashMap newWithKeysValues(int key1, double value1)
-
newWithKeysValues
public static IntDoubleHashMap newWithKeysValues(int key1, double value1, int key2, double value2)
-
newWithKeysValues
public static IntDoubleHashMap newWithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3)
-
newWithKeysValues
public static IntDoubleHashMap newWithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3, int key4, double value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceIntDoubleMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceIntDoubleMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceIntDoubleMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractDoubleIterable
-
doubleIterator
public MutableDoubleIterator doubleIterator()
- Specified by:
doubleIteratorin interfaceDoubleIterable- Specified by:
doubleIteratorin interfaceMutableDoubleValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectDoubleToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceDoubleIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableDoubleValuesMap- Specified by:
clearin interfaceMutableIntKeysMap
-
put
public void put(int key, double value)- Specified by:
putin interfaceMutableIntDoubleMap
-
putAll
public void putAll(IntDoubleMap map)
- Specified by:
putAllin interfaceMutableIntDoubleMap
-
updateValues
public void updateValues(IntDoubleToDoubleFunction function)
- Specified by:
updateValuesin interfaceMutableIntDoubleMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKeyin interfaceMutableIntDoubleMap- Specified by:
removeKeyin interfaceMutableIntKeysMap
-
remove
public void remove(int key)
- Specified by:
removein interfaceMutableIntDoubleMap
-
removeKeyIfAbsent
public double removeKeyIfAbsent(int key, double value)- Specified by:
removeKeyIfAbsentin interfaceMutableIntDoubleMap
-
getIfAbsentPut
public double getIfAbsentPut(int key, double value)- Specified by:
getIfAbsentPutin interfaceMutableIntDoubleMap
-
getAndPut
public double getAndPut(int key, double putValue, double defaultValue)- Specified by:
getAndPutin interfaceMutableIntDoubleMap
-
getIfAbsentPut
public double getIfAbsentPut(int key, DoubleFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableIntDoubleMap
-
getIfAbsentPutWith
public <P> double getIfAbsentPutWith(int key, DoubleFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableIntDoubleMap
-
getIfAbsentPutWithKey
public double getIfAbsentPutWithKey(int key, IntToDoubleFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntDoubleMap
-
addToValue
public double addToValue(int key, double toBeAdded)- Specified by:
addToValuein interfaceMutableIntDoubleMap
-
updateValue
public double updateValue(int key, double initialValueIfAbsent, DoubleToDoubleFunction function)- Specified by:
updateValuein interfaceMutableIntDoubleMap
-
withKeyValue
public IntDoubleHashMap withKeyValue(int key1, double value1)
- Specified by:
withKeyValuein interfaceMutableIntDoubleMap
-
withKeysValues
public IntDoubleHashMap withKeysValues(int key1, double value1, int key2, double value2)
-
withKeysValues
public IntDoubleHashMap withKeysValues(int key1, double value1, int key2, double value2, int key3, double value3)
-
withKeysValues
public IntDoubleHashMap withKeysValues(int key1, double value1, int key2, double value2, int key3, double value3, int key4, double value4)
-
withoutKey
public IntDoubleHashMap withoutKey(int key)
- Specified by:
withoutKeyin interfaceMutableIntDoubleMap
-
withoutAllKeys
public IntDoubleHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableIntDoubleMap
-
asUnmodifiable
public MutableIntDoubleMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntDoubleMap
-
asSynchronized
public MutableIntDoubleMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntDoubleMap
-
toImmutable
public ImmutableIntDoubleMap toImmutable()
- Specified by:
toImmutablein interfaceIntDoubleMap
-
get
public double get(int key)
- Specified by:
getin interfaceIntDoubleMap
-
getIfAbsent
public double getIfAbsent(int key, double ifAbsent)- Specified by:
getIfAbsentin interfaceIntDoubleMap
-
getOrThrow
public double getOrThrow(int key)
- Specified by:
getOrThrowin interfaceIntDoubleMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKeyin interfaceIntDoubleMap- Specified by:
containsKeyin interfaceIntKeysMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKeyin interfaceIntDoubleMap- Specified by:
forEachKeyin interfaceIntKeysMap
-
forEachKeyValue
public void forEachKeyValue(IntDoubleProcedure procedure)
- Specified by:
forEachKeyValuein interfaceIntDoubleMap
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysViewin interfaceIntDoubleMap
-
keyValuesView
public RichIterable<IntDoublePair> keyValuesView()
- Specified by:
keyValuesViewin interfaceIntDoubleMap
-
flipUniqueValues
public MutableDoubleIntMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceIntDoubleMap- Specified by:
flipUniqueValuesin interfaceMutableIntDoubleMap
-
select
public IntDoubleHashMap select(IntDoublePredicate predicate)
- Specified by:
selectin interfaceIntDoubleMap- Specified by:
selectin interfaceMutableIntDoubleMap
-
reject
public IntDoubleHashMap reject(IntDoublePredicate predicate)
- Specified by:
rejectin interfaceIntDoubleMap- Specified by:
rejectin interfaceMutableIntDoubleMap
-
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
-
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 MutableIntSet keySet()
- Specified by:
keySetin interfaceIntDoubleMap
-
values
public MutableDoubleCollection values()
- Specified by:
valuesin interfaceDoubleValuesMap
-
-