Class ShortDoubleHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractDoubleIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableDoubleValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.ShortDoubleHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,DoubleIterable,DoubleValuesMap,MutableDoubleValuesMap,MutableShortDoubleMap,ShortDoubleMap,PrimitiveIterable,MutableShortKeysMap,ShortKeysMap
public class ShortDoubleHashMap extends AbstractMutableDoubleValuesMap implements MutableShortDoubleMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortDoubleHashMap()ShortDoubleHashMap(int initialCapacity)ShortDoubleHashMap(ShortDoubleMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description doubleaddToValue(short key, double toBeAdded)MutableShortDoubleMapasSynchronized()MutableShortDoubleMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(short key)MutableDoubleIteratordoubleIterator()booleanequals(Object obj)MutableDoubleShortMapflipUniqueValues()voidforEachKey(ShortProcedure procedure)voidforEachKeyValue(ShortDoubleProcedure procedure)doubleget(short key)doublegetAndPut(short key, double putValue, double defaultValue)doublegetIfAbsent(short key, double ifAbsent)doublegetIfAbsentPut(short key, double value)doublegetIfAbsentPut(short key, DoubleFunction0 function)<P> doublegetIfAbsentPutWith(short key, DoubleFunction<? super P> function, P parameter)doublegetIfAbsentPutWithKey(short key, ShortToDoubleFunction function)doublegetOrThrow(short key)inthashCode()<V> VinjectInto(V injectedValue, ObjectDoubleToObjectFunction<? super V,? extends V> function)MutableShortSetkeySet()LazyShortIterablekeysView()RichIterable<ShortDoublePair>keyValuesView()static ShortDoubleHashMapnewWithKeysValues(short key1, double value1)static ShortDoubleHashMapnewWithKeysValues(short key1, double value1, short key2, double value2)static ShortDoubleHashMapnewWithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3)static ShortDoubleHashMapnewWithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3, short key4, double value4)voidput(short key, double value)voidputAll(ShortDoubleMap map)voidreadExternal(ObjectInput in)ShortDoubleHashMapreject(ShortDoublePredicate predicate)voidremove(short key)voidremoveKey(short key)doubleremoveKeyIfAbsent(short key, double value)ShortDoubleHashMapselect(ShortDoublePredicate predicate)ImmutableShortDoubleMaptoImmutable()StringtoString()booleantrimToSize()doubleupdateValue(short key, double initialValueIfAbsent, DoubleToDoubleFunction function)voidupdateValues(ShortDoubleToDoubleFunction function)MutableDoubleCollectionvalues()ShortDoubleHashMapwithKeysValues(short key1, double value1, short key2, double value2)ShortDoubleHashMapwithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3)ShortDoubleHashMapwithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3, short key4, double value4)ShortDoubleHashMapwithKeyValue(short key1, double value1)ShortDoubleHashMapwithoutAllKeys(ShortIterable keys)ShortDoubleHashMapwithoutKey(short 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.MutableDoubleValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortDoubleMap
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.ShortDoubleMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
-
-
-
Constructor Detail
-
ShortDoubleHashMap
public ShortDoubleHashMap()
-
ShortDoubleHashMap
public ShortDoubleHashMap(int initialCapacity)
-
ShortDoubleHashMap
public ShortDoubleHashMap(ShortDoubleMap map)
-
-
Method Detail
-
newWithKeysValues
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1)
-
newWithKeysValues
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1, short key2, double value2)
-
newWithKeysValues
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3)
-
newWithKeysValues
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3, short key4, double value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceShortDoubleMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortDoubleMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortDoubleMap- 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 interfaceMutableShortKeysMap
-
put
public void put(short key, double value)- Specified by:
putin interfaceMutableShortDoubleMap
-
putAll
public void putAll(ShortDoubleMap map)
- Specified by:
putAllin interfaceMutableShortDoubleMap
-
updateValues
public void updateValues(ShortDoubleToDoubleFunction function)
- Specified by:
updateValuesin interfaceMutableShortDoubleMap
-
removeKey
public void removeKey(short key)
- Specified by:
removeKeyin interfaceMutableShortDoubleMap- Specified by:
removeKeyin interfaceMutableShortKeysMap
-
remove
public void remove(short key)
- Specified by:
removein interfaceMutableShortDoubleMap
-
removeKeyIfAbsent
public double removeKeyIfAbsent(short key, double value)- Specified by:
removeKeyIfAbsentin interfaceMutableShortDoubleMap
-
getIfAbsentPut
public double getIfAbsentPut(short key, double value)- Specified by:
getIfAbsentPutin interfaceMutableShortDoubleMap
-
getAndPut
public double getAndPut(short key, double putValue, double defaultValue)- Specified by:
getAndPutin interfaceMutableShortDoubleMap
-
getIfAbsentPut
public double getIfAbsentPut(short key, DoubleFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortDoubleMap
-
getIfAbsentPutWith
public <P> double getIfAbsentPutWith(short key, DoubleFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortDoubleMap
-
getIfAbsentPutWithKey
public double getIfAbsentPutWithKey(short key, ShortToDoubleFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortDoubleMap
-
addToValue
public double addToValue(short key, double toBeAdded)- Specified by:
addToValuein interfaceMutableShortDoubleMap
-
updateValue
public double updateValue(short key, double initialValueIfAbsent, DoubleToDoubleFunction function)- Specified by:
updateValuein interfaceMutableShortDoubleMap
-
withKeyValue
public ShortDoubleHashMap withKeyValue(short key1, double value1)
- Specified by:
withKeyValuein interfaceMutableShortDoubleMap
-
withKeysValues
public ShortDoubleHashMap withKeysValues(short key1, double value1, short key2, double value2)
-
withKeysValues
public ShortDoubleHashMap withKeysValues(short key1, double value1, short key2, double value2, short key3, double value3)
-
withKeysValues
public ShortDoubleHashMap withKeysValues(short key1, double value1, short key2, double value2, short key3, double value3, short key4, double value4)
-
withoutKey
public ShortDoubleHashMap withoutKey(short key)
- Specified by:
withoutKeyin interfaceMutableShortDoubleMap
-
withoutAllKeys
public ShortDoubleHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortDoubleMap
-
asUnmodifiable
public MutableShortDoubleMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortDoubleMap
-
asSynchronized
public MutableShortDoubleMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortDoubleMap
-
toImmutable
public ImmutableShortDoubleMap toImmutable()
- Specified by:
toImmutablein interfaceShortDoubleMap
-
get
public double get(short key)
- Specified by:
getin interfaceShortDoubleMap
-
getIfAbsent
public double getIfAbsent(short key, double ifAbsent)- Specified by:
getIfAbsentin interfaceShortDoubleMap
-
getOrThrow
public double getOrThrow(short key)
- Specified by:
getOrThrowin interfaceShortDoubleMap
-
containsKey
public boolean containsKey(short key)
- Specified by:
containsKeyin interfaceShortDoubleMap- Specified by:
containsKeyin interfaceShortKeysMap
-
forEachKey
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortDoubleMap- Specified by:
forEachKeyin interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortDoubleProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortDoubleMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortDoubleMap
-
keyValuesView
public RichIterable<ShortDoublePair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortDoubleMap
-
flipUniqueValues
public MutableDoubleShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortDoubleMap- Specified by:
flipUniqueValuesin interfaceShortDoubleMap
-
select
public ShortDoubleHashMap select(ShortDoublePredicate predicate)
- Specified by:
selectin interfaceMutableShortDoubleMap- Specified by:
selectin interfaceShortDoubleMap
-
reject
public ShortDoubleHashMap reject(ShortDoublePredicate predicate)
- Specified by:
rejectin interfaceMutableShortDoubleMap- Specified by:
rejectin interfaceShortDoubleMap
-
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 MutableShortSet keySet()
- Specified by:
keySetin interfaceShortDoubleMap
-
values
public MutableDoubleCollection values()
- Specified by:
valuesin interfaceDoubleValuesMap
-
-