Class ShortLongHashMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractLongIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
org.eclipse.collections.impl.map.mutable.primitive.ShortLongHashMap
- All Implemented Interfaces:
Externalizable,Serializable,LongIterable,LongValuesMap,MutableLongValuesMap,MutableShortLongMap,ShortLongMap,PrimitiveIterable,MutableShortKeysMap,ShortKeysMap
public class ShortLongHashMap
extends AbstractMutableLongValuesMap
implements MutableShortLongMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongaddToValue(short key, long toBeAdded) booleanallSatisfyKeyValue(ShortLongPredicate predicate) voidclear()voidcompact()Deprecated.booleancontainsKey(short key) booleanvoidforEachKey(ShortProcedure procedure) voidforEachKeyValue(ShortLongProcedure procedure) longget(short key) longgetAndPut(short key, long putValue, long defaultValue) longgetIfAbsent(short key, long ifAbsent) longgetIfAbsentPut(short key, long value) longgetIfAbsentPut(short key, LongFunction0 function) <P> longgetIfAbsentPutWith(short key, LongFunction<? super P> function, P parameter) longgetIfAbsentPutWithKey(short key, ShortToLongFunction function) longgetOrThrow(short key) inthashCode()<V> VinjectInto(V injectedValue, ObjectLongToObjectFunction<? super V, ? extends V> function) keySet()keysView()static ShortLongHashMapnewWithKeysValues(short key1, long value1) static ShortLongHashMapnewWithKeysValues(short key1, long value1, short key2, long value2) static ShortLongHashMapnewWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3) static ShortLongHashMapnewWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4) voidput(short key, long value) voidputAll(ShortLongMap map) voidreject(ShortLongPredicate predicate) voidremove(short key) voidremoveKey(short key) longremoveKeyIfAbsent(short key, long value) select(ShortLongPredicate predicate) toString()booleanlongupdateValue(short key, long initialValueIfAbsent, LongToLongFunction function) voidupdateValues(ShortLongToLongFunction function) values()withKeysValues(short key1, long value1, short key2, long value2) withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3) withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4) withKeyValue(short key1, long value1) withoutAllKeys(ShortIterable keys) withoutKey(short key) voidMethods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableLongValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArrayMethods inherited from class org.eclipse.collections.impl.primitive.AbstractLongIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListMethods inherited from interface org.eclipse.collections.api.LongIterable
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, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.LongValuesMap
containsValue, forEachValue, tapMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongValuesMap
collect, reject, selectMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortLongMap
putPair, withAllKeyValuesMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeMethods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, sizeMethods inherited from interface org.eclipse.collections.api.map.primitive.ShortLongMap
injectIntoKeyValue
-
Constructor Details
-
ShortLongHashMap
public ShortLongHashMap() -
ShortLongHashMap
public ShortLongHashMap(int initialCapacity) -
ShortLongHashMap
-
-
Method Details
-
newWithKeysValues
-
newWithKeysValues
-
newWithKeysValues
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3) -
newWithKeysValues
public static ShortLongHashMap newWithKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4) -
equals
- Specified by:
equalsin interfaceShortLongMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceShortLongMap- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortLongMap- Overrides:
toStringin classAbstractLongIterable
-
longIterator
- Specified by:
longIteratorin interfaceLongIterable- Specified by:
longIteratorin interfaceMutableLongValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V, ? extends V> function) - Specified by:
injectIntoin interfaceLongIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableLongValuesMap- Specified by:
clearin interfaceMutableShortKeysMap
-
put
public void put(short key, long value) - Specified by:
putin interfaceMutableShortLongMap
-
putAll
- Specified by:
putAllin interfaceMutableShortLongMap
-
updateValues
- Specified by:
updateValuesin interfaceMutableShortLongMap
-
removeKey
public void removeKey(short key) - Specified by:
removeKeyin interfaceMutableShortKeysMap- Specified by:
removeKeyin interfaceMutableShortLongMap
-
remove
public void remove(short key) - Specified by:
removein interfaceMutableShortLongMap
-
removeKeyIfAbsent
public long removeKeyIfAbsent(short key, long value) - Specified by:
removeKeyIfAbsentin interfaceMutableShortLongMap
-
getIfAbsentPut
public long getIfAbsentPut(short key, long value) - Specified by:
getIfAbsentPutin interfaceMutableShortLongMap
-
getAndPut
public long getAndPut(short key, long putValue, long defaultValue) - Specified by:
getAndPutin interfaceMutableShortLongMap
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableShortLongMap
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableShortLongMap
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortLongMap
-
addToValue
public long addToValue(short key, long toBeAdded) - Specified by:
addToValuein interfaceMutableShortLongMap
-
updateValue
- Specified by:
updateValuein interfaceMutableShortLongMap
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableShortLongMap
-
withKeysValues
-
withKeysValues
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3) -
withKeysValues
public ShortLongHashMap withKeysValues(short key1, long value1, short key2, long value2, short key3, long value3, short key4, long value4) -
withoutKey
- Specified by:
withoutKeyin interfaceMutableShortLongMap
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableShortLongMap
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableShortLongMap
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableShortLongMap
-
toImmutable
- Specified by:
toImmutablein interfaceShortLongMap
-
get
public long get(short key) - Specified by:
getin interfaceShortLongMap
-
getIfAbsent
public long getIfAbsent(short key, long ifAbsent) - Specified by:
getIfAbsentin interfaceShortLongMap
-
getOrThrow
public long getOrThrow(short key) - Specified by:
getOrThrowin interfaceShortLongMap
-
containsKey
public boolean containsKey(short key) - Specified by:
containsKeyin interfaceShortKeysMap- Specified by:
containsKeyin interfaceShortLongMap
-
forEachKey
- Specified by:
forEachKeyin interfaceShortKeysMap- Specified by:
forEachKeyin interfaceShortLongMap
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceShortLongMap
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceShortLongMap- Since:
- 12.0
-
keysView
- Specified by:
keysViewin interfaceShortLongMap
-
keyValuesView
- Specified by:
keyValuesViewin interfaceShortLongMap
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceMutableShortLongMap- Specified by:
flipUniqueValuesin interfaceShortLongMap
-
select
- Specified by:
selectin interfaceMutableShortLongMap- Specified by:
selectin interfaceShortLongMap
-
reject
- Specified by:
rejectin interfaceMutableShortLongMap- Specified by:
rejectin interfaceShortLongMap
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
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
- Specified by:
keySetin interfaceShortLongMap
-
values
- Specified by:
valuesin interfaceLongValuesMap
-
trimToSize()instead