Class IntShortHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractShortIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.IntShortHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,IntShortMap,MutableIntShortMap,MutableShortValuesMap,ShortValuesMap,PrimitiveIterable,ShortIterable,MutableIntKeysMap,IntKeysMap
public class IntShortHashMap extends AbstractMutableShortValuesMap implements MutableIntShortMap, Externalizable, MutableIntKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntShortHashMap()IntShortHashMap(int initialCapacity)IntShortHashMap(IntShortMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description shortaddToValue(int key, short toBeAdded)booleanallSatisfyKeyValue(IntShortPredicate predicate)MutableIntShortMapasSynchronized()MutableIntShortMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(int key)booleanequals(Object obj)MutableShortIntMapflipUniqueValues()voidforEachKey(IntProcedure procedure)voidforEachKeyValue(IntShortProcedure procedure)shortget(int key)shortgetAndPut(int key, short putValue, short defaultValue)shortgetIfAbsent(int key, short ifAbsent)shortgetIfAbsentPut(int key, short value)shortgetIfAbsentPut(int key, ShortFunction0 function)<P> shortgetIfAbsentPutWith(int key, ShortFunction<? super P> function, P parameter)shortgetIfAbsentPutWithKey(int key, IntToShortFunction function)shortgetOrThrow(int key)inthashCode()<V> VinjectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)MutableIntSetkeySet()LazyIntIterablekeysView()RichIterable<IntShortPair>keyValuesView()static IntShortHashMapnewWithKeysValues(int key1, short value1)static IntShortHashMapnewWithKeysValues(int key1, short value1, int key2, short value2)static IntShortHashMapnewWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)static IntShortHashMapnewWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)voidput(int key, short value)voidputAll(IntShortMap map)voidreadExternal(ObjectInput in)IntShortHashMapreject(IntShortPredicate predicate)voidremove(int key)voidremoveKey(int key)shortremoveKeyIfAbsent(int key, short value)IntShortHashMapselect(IntShortPredicate predicate)MutableShortIteratorshortIterator()ImmutableIntShortMaptoImmutable()StringtoString()booleantrimToSize()shortupdateValue(int key, short initialValueIfAbsent, ShortToShortFunction function)voidupdateValues(IntShortToShortFunction function)MutableShortCollectionvalues()IntShortHashMapwithKeysValues(int key1, short value1, int key2, short value2)IntShortHashMapwithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)IntShortHashMapwithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)IntShortHashMapwithKeyValue(int key1, short value1)IntShortHashMapwithoutAllKeys(IntIterable keys)IntShortHashMapwithoutKey(int key)voidwriteExternal(ObjectOutput out)-
Methods 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, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.IntKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntShortMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntShortMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortValuesMap
collect, reject, select
-
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.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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortValuesMap
containsValue, forEachValue, tap
-
-
-
-
Constructor Detail
-
IntShortHashMap
public IntShortHashMap()
-
IntShortHashMap
public IntShortHashMap(int initialCapacity)
-
IntShortHashMap
public IntShortHashMap(IntShortMap map)
-
-
Method Detail
-
newWithKeysValues
public static IntShortHashMap newWithKeysValues(int key1, short value1)
-
newWithKeysValues
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2)
-
newWithKeysValues
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
-
newWithKeysValues
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceIntShortMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceIntShortMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceIntShortMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractShortIterable
-
shortIterator
public MutableShortIterator 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 interfaceMutableIntKeysMap- Specified by:
clearin interfaceMutableShortValuesMap
-
put
public void put(int key, short value)- Specified by:
putin interfaceMutableIntShortMap
-
putAll
public void putAll(IntShortMap map)
- Specified by:
putAllin interfaceMutableIntShortMap
-
updateValues
public void updateValues(IntShortToShortFunction function)
- Specified by:
updateValuesin interfaceMutableIntShortMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKeyin interfaceMutableIntKeysMap- Specified by:
removeKeyin interfaceMutableIntShortMap
-
remove
public void remove(int key)
- Specified by:
removein interfaceMutableIntShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(int key, short value)- Specified by:
removeKeyIfAbsentin interfaceMutableIntShortMap
-
getIfAbsentPut
public short getIfAbsentPut(int key, short value)- Specified by:
getIfAbsentPutin interfaceMutableIntShortMap
-
getAndPut
public short getAndPut(int key, short putValue, short defaultValue)- Specified by:
getAndPutin interfaceMutableIntShortMap
-
getIfAbsentPut
public short getIfAbsentPut(int key, ShortFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableIntShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(int key, ShortFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableIntShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(int key, IntToShortFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableIntShortMap
-
addToValue
public short addToValue(int key, short toBeAdded)- Specified by:
addToValuein interfaceMutableIntShortMap
-
updateValue
public short updateValue(int key, short initialValueIfAbsent, ShortToShortFunction function)- Specified by:
updateValuein interfaceMutableIntShortMap
-
withKeyValue
public IntShortHashMap withKeyValue(int key1, short value1)
- Specified by:
withKeyValuein interfaceMutableIntShortMap
-
withKeysValues
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2)
-
withKeysValues
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
-
withKeysValues
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
-
withoutKey
public IntShortHashMap withoutKey(int key)
- Specified by:
withoutKeyin interfaceMutableIntShortMap
-
withoutAllKeys
public IntShortHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableIntShortMap
-
asUnmodifiable
public MutableIntShortMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntShortMap
-
asSynchronized
public MutableIntShortMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntShortMap
-
toImmutable
public ImmutableIntShortMap toImmutable()
- Specified by:
toImmutablein interfaceIntShortMap
-
get
public short get(int key)
- Specified by:
getin interfaceIntShortMap
-
getIfAbsent
public short getIfAbsent(int key, short ifAbsent)- Specified by:
getIfAbsentin interfaceIntShortMap
-
getOrThrow
public short getOrThrow(int key)
- Specified by:
getOrThrowin interfaceIntShortMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKeyin interfaceIntKeysMap- Specified by:
containsKeyin interfaceIntShortMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKeyin interfaceIntKeysMap- Specified by:
forEachKeyin interfaceIntShortMap
-
forEachKeyValue
public void forEachKeyValue(IntShortProcedure procedure)
- Specified by:
forEachKeyValuein interfaceIntShortMap
-
allSatisfyKeyValue
public boolean allSatisfyKeyValue(IntShortPredicate predicate)
- Specified by:
allSatisfyKeyValuein interfaceIntShortMap- Since:
- 12.0
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysViewin interfaceIntShortMap
-
keyValuesView
public RichIterable<IntShortPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceIntShortMap
-
flipUniqueValues
public MutableShortIntMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceIntShortMap- Specified by:
flipUniqueValuesin interfaceMutableIntShortMap
-
select
public IntShortHashMap select(IntShortPredicate predicate)
- Specified by:
selectin interfaceIntShortMap- Specified by:
selectin interfaceMutableIntShortMap
-
reject
public IntShortHashMap reject(IntShortPredicate predicate)
- Specified by:
rejectin interfaceIntShortMap- Specified by:
rejectin interfaceMutableIntShortMap
-
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 MutableIntSet keySet()
- Specified by:
keySetin interfaceIntShortMap
-
values
public MutableShortCollection values()
- Specified by:
valuesin interfaceShortValuesMap
-
-