Class ShortIntHashMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
org.eclipse.collections.impl.map.mutable.primitive.ShortIntHashMap
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,IntValuesMap,MutableIntValuesMap,MutableShortIntMap,ShortIntMap,PrimitiveIterable,MutableShortKeysMap,ShortKeysMap
public class ShortIntHashMap
extends AbstractMutableIntValuesMap
implements MutableShortIntMap, Externalizable, MutableShortKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddToValue(short key, int toBeAdded) booleanallSatisfyKeyValue(ShortIntPredicate predicate) voidclear()voidcompact()Deprecated.booleancontainsKey(short key) booleanvoidforEachKey(ShortProcedure procedure) voidforEachKeyValue(ShortIntProcedure procedure) intget(short key) intgetAndPut(short key, int putValue, int defaultValue) intgetIfAbsent(short key, int ifAbsent) intgetIfAbsentPut(short key, int value) intgetIfAbsentPut(short key, IntFunction0 function) <P> intgetIfAbsentPutWith(short key, IntFunction<? super P> function, P parameter) intgetIfAbsentPutWithKey(short key, ShortToIntFunction function) intgetOrThrow(short key) inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V, ? extends V> function) keySet()keysView()static ShortIntHashMapnewWithKeysValues(short key1, int value1) static ShortIntHashMapnewWithKeysValues(short key1, int value1, short key2, int value2) static ShortIntHashMapnewWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3) static ShortIntHashMapnewWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4) voidput(short key, int value) voidputAll(ShortIntMap map) voidreject(ShortIntPredicate predicate) voidremove(short key) voidremoveKey(short key) intremoveKeyIfAbsent(short key, int value) select(ShortIntPredicate predicate) toString()booleanintupdateValue(short key, int initialValueIfAbsent, IntToIntFunction function) voidupdateValues(ShortIntToIntFunction function) values()withKeysValues(short key1, int value1, short key2, int value2) withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3) withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4) withKeyValue(short key1, int value1) withoutAllKeys(ShortIterable keys) withoutKey(short key) voidMethods 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, toArrayMethods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListMethods 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tapMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, selectMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortIntMap
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.api.map.primitive.ShortIntMap
injectIntoKeyValueMethods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
Constructor Details
-
ShortIntHashMap
public ShortIntHashMap() -
ShortIntHashMap
public ShortIntHashMap(int initialCapacity) -
ShortIntHashMap
-
-
Method Details
-
newWithKeysValues
-
newWithKeysValues
-
newWithKeysValues
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3) -
newWithKeysValues
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4) -
equals
- Specified by:
equalsin interfaceShortIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceShortIntMap- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortIntMap- Overrides:
toStringin classAbstractIntIterable
-
intIterator
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableIntValuesMap- Specified by:
clearin interfaceMutableShortKeysMap
-
put
public void put(short key, int value) - Specified by:
putin interfaceMutableShortIntMap
-
putAll
- Specified by:
putAllin interfaceMutableShortIntMap
-
updateValues
- Specified by:
updateValuesin interfaceMutableShortIntMap
-
removeKey
public void removeKey(short key) - Specified by:
removeKeyin interfaceMutableShortIntMap- Specified by:
removeKeyin interfaceMutableShortKeysMap
-
remove
public void remove(short key) - Specified by:
removein interfaceMutableShortIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(short key, int value) - Specified by:
removeKeyIfAbsentin interfaceMutableShortIntMap
-
getIfAbsentPut
public int getIfAbsentPut(short key, int value) - Specified by:
getIfAbsentPutin interfaceMutableShortIntMap
-
getAndPut
public int getAndPut(short key, int putValue, int defaultValue) - Specified by:
getAndPutin interfaceMutableShortIntMap
-
getIfAbsentPut
- Specified by:
getIfAbsentPutin interfaceMutableShortIntMap
-
getIfAbsentPutWith
- Specified by:
getIfAbsentPutWithin interfaceMutableShortIntMap
-
getIfAbsentPutWithKey
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortIntMap
-
addToValue
public int addToValue(short key, int toBeAdded) - Specified by:
addToValuein interfaceMutableShortIntMap
-
updateValue
- Specified by:
updateValuein interfaceMutableShortIntMap
-
withKeyValue
- Specified by:
withKeyValuein interfaceMutableShortIntMap
-
withKeysValues
-
withKeysValues
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3) -
withKeysValues
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4) -
withoutKey
- Specified by:
withoutKeyin interfaceMutableShortIntMap
-
withoutAllKeys
- Specified by:
withoutAllKeysin interfaceMutableShortIntMap
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableShortIntMap
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableShortIntMap
-
toImmutable
- Specified by:
toImmutablein interfaceShortIntMap
-
get
public int get(short key) - Specified by:
getin interfaceShortIntMap
-
getIfAbsent
public int getIfAbsent(short key, int ifAbsent) - Specified by:
getIfAbsentin interfaceShortIntMap
-
getOrThrow
public int getOrThrow(short key) - Specified by:
getOrThrowin interfaceShortIntMap
-
containsKey
public boolean containsKey(short key) - Specified by:
containsKeyin interfaceShortIntMap- Specified by:
containsKeyin interfaceShortKeysMap
-
forEachKey
- Specified by:
forEachKeyin interfaceShortIntMap- Specified by:
forEachKeyin interfaceShortKeysMap
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceShortIntMap
-
allSatisfyKeyValue
- Specified by:
allSatisfyKeyValuein interfaceShortIntMap- Since:
- 12.0
-
keysView
- Specified by:
keysViewin interfaceShortIntMap
-
keyValuesView
- Specified by:
keyValuesViewin interfaceShortIntMap
-
flipUniqueValues
- Specified by:
flipUniqueValuesin interfaceMutableShortIntMap- Specified by:
flipUniqueValuesin interfaceShortIntMap
-
select
- Specified by:
selectin interfaceMutableShortIntMap- Specified by:
selectin interfaceShortIntMap
-
reject
- Specified by:
rejectin interfaceMutableShortIntMap- Specified by:
rejectin interfaceShortIntMap
-
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 interfaceShortIntMap
-
values
- Specified by:
valuesin interfaceIntValuesMap
-
trimToSize()instead