Class DoubleIntHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractIntIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.DoubleIntHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,DoubleIntMap,IntValuesMap,MutableDoubleIntMap,MutableIntValuesMap,PrimitiveIterable,MutableDoubleKeysMap,DoubleKeysMap
public class DoubleIntHashMap extends AbstractMutableIntValuesMap implements MutableDoubleIntMap, Externalizable, MutableDoubleKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DoubleIntHashMap()DoubleIntHashMap(int initialCapacity)DoubleIntHashMap(DoubleIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaddToValue(double key, int toBeAdded)MutableDoubleIntMapasSynchronized()MutableDoubleIntMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(double key)booleanequals(Object obj)MutableIntDoubleMapflipUniqueValues()voidforEachKey(DoubleProcedure procedure)voidforEachKeyValue(DoubleIntProcedure procedure)intget(double key)intgetAndPut(double key, int putValue, int defaultValue)intgetIfAbsent(double key, int ifAbsent)intgetIfAbsentPut(double key, int value)intgetIfAbsentPut(double key, IntFunction0 function)<P> intgetIfAbsentPutWith(double key, IntFunction<? super P> function, P parameter)intgetIfAbsentPutWithKey(double key, DoubleToIntFunction function)intgetOrThrow(double key)inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)MutableIntIteratorintIterator()MutableDoubleSetkeySet()LazyDoubleIterablekeysView()RichIterable<DoubleIntPair>keyValuesView()static DoubleIntHashMapnewWithKeysValues(double key1, int value1)static DoubleIntHashMapnewWithKeysValues(double key1, int value1, double key2, int value2)static DoubleIntHashMapnewWithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3)static DoubleIntHashMapnewWithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3, double key4, int value4)voidput(double key, int value)voidputAll(DoubleIntMap map)voidreadExternal(ObjectInput in)DoubleIntHashMapreject(DoubleIntPredicate predicate)voidremove(double key)voidremoveKey(double key)intremoveKeyIfAbsent(double key, int value)DoubleIntHashMapselect(DoubleIntPredicate predicate)ImmutableDoubleIntMaptoImmutable()StringtoString()booleantrimToSize()intupdateValue(double key, int initialValueIfAbsent, IntToIntFunction function)voidupdateValues(DoubleIntToIntFunction function)MutableIntCollectionvalues()DoubleIntHashMapwithKeysValues(double key1, int value1, double key2, int value2)DoubleIntHashMapwithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3)DoubleIntHashMapwithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3, double key4, int value4)DoubleIntHashMapwithKeyValue(double key1, int value1)DoubleIntHashMapwithoutAllKeys(DoubleIterable keys)DoubleIntHashMapwithoutKey(double key)voidwriteExternal(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.DoubleIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.DoubleKeysMap
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.MutableDoubleIntMap
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
-
DoubleIntHashMap
public DoubleIntHashMap()
-
DoubleIntHashMap
public DoubleIntHashMap(int initialCapacity)
-
DoubleIntHashMap
public DoubleIntHashMap(DoubleIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static DoubleIntHashMap newWithKeysValues(double key1, int value1)
-
newWithKeysValues
public static DoubleIntHashMap newWithKeysValues(double key1, int value1, double key2, int value2)
-
newWithKeysValues
public static DoubleIntHashMap newWithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3)
-
newWithKeysValues
public static DoubleIntHashMap newWithKeysValues(double key1, int value1, double key2, int value2, double key3, int value3, double key4, int value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceDoubleIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceDoubleIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceDoubleIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceIntIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableDoubleKeysMap- Specified by:
clearin interfaceMutableIntValuesMap
-
put
public void put(double key, int value)- Specified by:
putin interfaceMutableDoubleIntMap
-
putAll
public void putAll(DoubleIntMap map)
- Specified by:
putAllin interfaceMutableDoubleIntMap
-
updateValues
public void updateValues(DoubleIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableDoubleIntMap
-
removeKey
public void removeKey(double key)
- Specified by:
removeKeyin interfaceMutableDoubleIntMap- Specified by:
removeKeyin interfaceMutableDoubleKeysMap
-
remove
public void remove(double key)
- Specified by:
removein interfaceMutableDoubleIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(double key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableDoubleIntMap
-
getIfAbsentPut
public int getIfAbsentPut(double key, int value)- Specified by:
getIfAbsentPutin interfaceMutableDoubleIntMap
-
getAndPut
public int getAndPut(double key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableDoubleIntMap
-
getIfAbsentPut
public int getIfAbsentPut(double key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableDoubleIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(double key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableDoubleIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(double key, DoubleToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableDoubleIntMap
-
addToValue
public int addToValue(double key, int toBeAdded)- Specified by:
addToValuein interfaceMutableDoubleIntMap
-
updateValue
public int updateValue(double key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableDoubleIntMap
-
withKeyValue
public DoubleIntHashMap withKeyValue(double key1, int value1)
- Specified by:
withKeyValuein interfaceMutableDoubleIntMap
-
withKeysValues
public DoubleIntHashMap withKeysValues(double key1, int value1, double key2, int value2)
-
withKeysValues
public DoubleIntHashMap withKeysValues(double key1, int value1, double key2, int value2, double key3, int value3)
-
withKeysValues
public DoubleIntHashMap withKeysValues(double key1, int value1, double key2, int value2, double key3, int value3, double key4, int value4)
-
withoutKey
public DoubleIntHashMap withoutKey(double key)
- Specified by:
withoutKeyin interfaceMutableDoubleIntMap
-
withoutAllKeys
public DoubleIntHashMap withoutAllKeys(DoubleIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableDoubleIntMap
-
asUnmodifiable
public MutableDoubleIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableDoubleIntMap
-
asSynchronized
public MutableDoubleIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableDoubleIntMap
-
toImmutable
public ImmutableDoubleIntMap toImmutable()
- Specified by:
toImmutablein interfaceDoubleIntMap
-
get
public int get(double key)
- Specified by:
getin interfaceDoubleIntMap
-
getIfAbsent
public int getIfAbsent(double key, int ifAbsent)- Specified by:
getIfAbsentin interfaceDoubleIntMap
-
getOrThrow
public int getOrThrow(double key)
- Specified by:
getOrThrowin interfaceDoubleIntMap
-
containsKey
public boolean containsKey(double key)
- Specified by:
containsKeyin interfaceDoubleIntMap- Specified by:
containsKeyin interfaceDoubleKeysMap
-
forEachKey
public void forEachKey(DoubleProcedure procedure)
- Specified by:
forEachKeyin interfaceDoubleIntMap- Specified by:
forEachKeyin interfaceDoubleKeysMap
-
forEachKeyValue
public void forEachKeyValue(DoubleIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceDoubleIntMap
-
keysView
public LazyDoubleIterable keysView()
- Specified by:
keysViewin interfaceDoubleIntMap
-
keyValuesView
public RichIterable<DoubleIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceDoubleIntMap
-
flipUniqueValues
public MutableIntDoubleMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceDoubleIntMap- Specified by:
flipUniqueValuesin interfaceMutableDoubleIntMap
-
select
public DoubleIntHashMap select(DoubleIntPredicate predicate)
- Specified by:
selectin interfaceDoubleIntMap- Specified by:
selectin interfaceMutableDoubleIntMap
-
reject
public DoubleIntHashMap reject(DoubleIntPredicate predicate)
- Specified by:
rejectin interfaceDoubleIntMap- Specified by:
rejectin interfaceMutableDoubleIntMap
-
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 MutableDoubleSet keySet()
- Specified by:
keySetin interfaceDoubleIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
-