Class LongShortHashMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractShortIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
org.eclipse.collections.impl.map.mutable.primitive.LongShortHashMap
- All Implemented Interfaces:
Externalizable,Serializable,LongShortMap,MutableLongShortMap,MutableShortValuesMap,ShortValuesMap,PrimitiveIterable,ShortIterable,MutableLongKeysMap,LongKeysMap
public class LongShortHashMap
extends AbstractMutableShortValuesMap
implements MutableLongShortMap, Externalizable, MutableLongKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshortaddToValue(long key, short toBeAdded) booleanallSatisfyKeyValue(LongShortPredicate predicate) voidclear()voidcompact()Deprecated.booleancontainsKey(long key) booleanvoidforEachKey(LongProcedure procedure) voidforEachKeyValue(LongShortProcedure procedure) shortget(long key) shortgetAndPut(long key, short putValue, short defaultValue) shortgetIfAbsent(long key, short ifAbsent) shortgetIfAbsentPut(long key, short value) shortgetIfAbsentPut(long key, ShortFunction0 function) <P> shortgetIfAbsentPutWith(long key, ShortFunction<? super P> function, P parameter) shortgetIfAbsentPutWithKey(long key, LongToShortFunction function) shortgetOrThrow(long key) inthashCode()<V> VinjectInto(V injectedValue, ObjectShortToObjectFunction<? super V, ? extends V> function) keySet()keysView()static LongShortHashMapnewWithKeysValues(long key1, short value1) static LongShortHashMapnewWithKeysValues(long key1, short value1, long key2, short value2) static LongShortHashMapnewWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3) static LongShortHashMapnewWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4) voidput(long key, short value) voidputAll(LongShortMap map) voidreject(LongShortPredicate predicate) voidremove(long key) voidremoveKey(long key) shortremoveKeyIfAbsent(long key, short value) select(LongShortPredicate predicate) toString()booleanshortupdateValue(long key, short initialValueIfAbsent, ShortToShortFunction function) voidupdateValues(LongShortToShortFunction function) values()withKeysValues(long key1, short value1, long key2, short value2) withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3) withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4) withKeyValue(long key1, short value1) withoutAllKeys(LongIterable keys) withoutKey(long key) voidMethods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
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.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListMethods inherited from interface org.eclipse.collections.impl.map.primitive.LongKeysMap
isEmpty, notEmpty, sizeMethods inherited from interface org.eclipse.collections.api.map.primitive.LongShortMap
injectIntoKeyValueMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableLongShortMap
putPair, withAllKeyValuesMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortValuesMap
collect, reject, selectMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeMethods inherited from interface org.eclipse.collections.api.ShortIterable
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.ShortValuesMap
containsValue, forEachValue, tap
-
Constructor Details
-
LongShortHashMap
public LongShortHashMap() -
LongShortHashMap
public LongShortHashMap(int initialCapacity) -
LongShortHashMap
-
-
Method Details
-
newWithKeysValues
-
newWithKeysValues
-
newWithKeysValues
public static LongShortHashMap newWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3) -
newWithKeysValues
public static LongShortHashMap newWithKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4) -
equals
- Specified by:
equalsin interfaceLongShortMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceLongShortMap- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfaceLongShortMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractShortIterable
-
shortIterator
- Specified by:
shortIteratorin interfaceMutableShortValuesMap- Specified by:
shortIteratorin interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V, ? extends V> function) - Specified by:
injectIntoin interfaceShortIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableLongKeysMap- Specified by:
clearin interfaceMutableShortValuesMap
-
put
public void put(long key, short value) - Specified by:
putin interfaceMutableLongShortMap
-
putAll
- Specified by:
putAllin interfaceMutableLongShortMap
-
updateValues
- Specified by:
updateValuesin interfaceMutableLongShortMap
-
removeKey
public void removeKey(long key) - Specified by:
removeKeyin interfaceMutableLongKeysMap- Specified by:
removeKeyin interfaceMutableLongShortMap
-
remove
public void remove(long key) - Specified by:
removein interfaceMutableLongShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(long key, short value) - Specified by:
removeKeyIfAbsentin interfaceMutableLongShortMap
-
getIfAbsentPut
public short getIfAbsentPut(long key, short value) - Specified by:
getIfAbsentPutin interfaceMutableLongShortMap
-
getAndPut
public short getAndPut(long key, short putValue, short defaultValue) - Specified by:
getAndPutin interfaceMutableLongShortMap
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableLongShortMap
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableLongShortMap
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableLongShortMap
-
addToValue
public short addToValue(long key, short toBeAdded) - Specified by:
addToValuein interfaceMutableLongShortMap
-
updateValue
- Specified by:
updateValuein interfaceMutableLongShortMap
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableLongShortMap
-
withKeysValues
-
withKeysValues
public LongShortHashMap withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3) -
withKeysValues
public LongShortHashMap withKeysValues(long key1, short value1, long key2, short value2, long key3, short value3, long key4, short value4) -
withoutKey
- Specified by:
withoutKeyin interfaceMutableLongShortMap
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableLongShortMap
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableLongShortMap
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableLongShortMap
-
toImmutable
- Specified by:
toImmutablein interfaceLongShortMap
-
get
public short get(long key) - Specified by:
getin interfaceLongShortMap
-
getIfAbsent
public short getIfAbsent(long key, short ifAbsent) - Specified by:
getIfAbsentin interfaceLongShortMap
-
getOrThrow
public short getOrThrow(long key) - Specified by:
getOrThrowin interfaceLongShortMap
-
containsKey
public boolean containsKey(long key) - Specified by:
containsKeyin interfaceLongKeysMap- Specified by:
containsKeyin interfaceLongShortMap
-
forEachKey
- Specified by:
forEachKeyin interfaceLongKeysMap- Specified by:
forEachKeyin interfaceLongShortMap
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceLongShortMap
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceLongShortMap- Since:
- 12.0
-
keysView
- Specified by:
keysViewin interfaceLongShortMap
-
keyValuesView
- Specified by:
keyValuesViewin interfaceLongShortMap
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceLongShortMap- Specified by:
flipUniqueValuesin interfaceMutableLongShortMap
-
select
- Specified by:
selectin interfaceLongShortMap- Specified by:
selectin interfaceMutableLongShortMap
-
reject
- Specified by:
rejectin interfaceLongShortMap- Specified by:
rejectin interfaceMutableLongShortMap
-
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 interfaceLongShortMap
-
values
- Specified by:
valuesin interfaceShortValuesMap
-
trimToSize()instead