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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortIntHashMap()ShortIntHashMap(int initialCapacity)ShortIntHashMap(ShortIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaddToValue(short key, int toBeAdded)MutableShortIntMapasSynchronized()MutableShortIntMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(short key)booleanequals(Object obj)MutableIntShortMapflipUniqueValues()voidforEachKey(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)MutableIntIteratorintIterator()MutableShortSetkeySet()LazyShortIterablekeysView()RichIterable<ShortIntPair>keyValuesView()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)voidreadExternal(ObjectInput in)ShortIntHashMapreject(ShortIntPredicate predicate)voidremove(short key)voidremoveKey(short key)intremoveKeyIfAbsent(short key, int value)ShortIntHashMapselect(ShortIntPredicate predicate)ImmutableShortIntMaptoImmutable()StringtoString()booleantrimToSize()intupdateValue(short key, int initialValueIfAbsent, IntToIntFunction function)voidupdateValues(ShortIntToIntFunction function)MutableIntCollectionvalues()ShortIntHashMapwithKeysValues(short key1, int value1, short key2, int value2)ShortIntHashMapwithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3)ShortIntHashMapwithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4)ShortIntHashMapwithKeyValue(short key1, int value1)ShortIntHashMapwithoutAllKeys(ShortIterable keys)ShortIntHashMapwithoutKey(short 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.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.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortIntMap
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.ShortIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.ShortKeysMap
isEmpty, notEmpty, size
-
-
-
-
Constructor Detail
-
ShortIntHashMap
public ShortIntHashMap()
-
ShortIntHashMap
public ShortIntHashMap(int initialCapacity)
-
ShortIntHashMap
public ShortIntHashMap(ShortIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static ShortIntHashMap newWithKeysValues(short key1, int value1)
-
newWithKeysValues
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2)
-
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
public boolean equals(Object obj)
- Specified by:
equalsin interfaceShortIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Specified by:
toStringin interfaceShortIntMap- 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 interfaceMutableIntValuesMap- Specified by:
clearin interfaceMutableShortKeysMap
-
put
public void put(short key, int value)- Specified by:
putin interfaceMutableShortIntMap
-
putAll
public void putAll(ShortIntMap map)
- Specified by:
putAllin interfaceMutableShortIntMap
-
updateValues
public void updateValues(ShortIntToIntFunction function)
- 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
public int getIfAbsentPut(short key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableShortIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(short key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableShortIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(short key, ShortToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableShortIntMap
-
addToValue
public int addToValue(short key, int toBeAdded)- Specified by:
addToValuein interfaceMutableShortIntMap
-
updateValue
public int updateValue(short key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableShortIntMap
-
withKeyValue
public ShortIntHashMap withKeyValue(short key1, int value1)
- Specified by:
withKeyValuein interfaceMutableShortIntMap
-
withKeysValues
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2)
-
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
public ShortIntHashMap withoutKey(short key)
- Specified by:
withoutKeyin interfaceMutableShortIntMap
-
withoutAllKeys
public ShortIntHashMap withoutAllKeys(ShortIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableShortIntMap
-
asUnmodifiable
public MutableShortIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortIntMap
-
asSynchronized
public MutableShortIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortIntMap
-
toImmutable
public ImmutableShortIntMap 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
public void forEachKey(ShortProcedure procedure)
- Specified by:
forEachKeyin interfaceShortIntMap- Specified by:
forEachKeyin interfaceShortKeysMap
-
forEachKeyValue
public void forEachKeyValue(ShortIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceShortIntMap
-
keysView
public LazyShortIterable keysView()
- Specified by:
keysViewin interfaceShortIntMap
-
keyValuesView
public RichIterable<ShortIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceShortIntMap
-
flipUniqueValues
public MutableIntShortMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableShortIntMap- Specified by:
flipUniqueValuesin interfaceShortIntMap
-
select
public ShortIntHashMap select(ShortIntPredicate predicate)
- Specified by:
selectin interfaceMutableShortIntMap- Specified by:
selectin interfaceShortIntMap
-
reject
public ShortIntHashMap reject(ShortIntPredicate predicate)
- Specified by:
rejectin interfaceMutableShortIntMap- Specified by:
rejectin interfaceShortIntMap
-
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 interfaceShortIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
-