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 short
addToValue(int key, short toBeAdded)
MutableIntShortMap
asSynchronized()
MutableIntShortMap
asUnmodifiable()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(int key)
boolean
equals(Object obj)
MutableShortIntMap
flipUniqueValues()
void
forEachKey(IntProcedure procedure)
void
forEachKeyValue(IntShortProcedure procedure)
short
get(int key)
short
getAndPut(int key, short putValue, short defaultValue)
short
getIfAbsent(int key, short ifAbsent)
short
getIfAbsentPut(int key, short value)
short
getIfAbsentPut(int key, ShortFunction0 function)
<P> short
getIfAbsentPutWith(int key, ShortFunction<? super P> function, P parameter)
short
getIfAbsentPutWithKey(int key, IntToShortFunction function)
short
getOrThrow(int key)
int
hashCode()
<V> V
injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
MutableIntSet
keySet()
LazyIntIterable
keysView()
RichIterable<IntShortPair>
keyValuesView()
static IntShortHashMap
newWithKeysValues(int key1, short value1)
static IntShortHashMap
newWithKeysValues(int key1, short value1, int key2, short value2)
static IntShortHashMap
newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
static IntShortHashMap
newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
void
put(int key, short value)
void
putAll(IntShortMap map)
void
readExternal(ObjectInput in)
IntShortHashMap
reject(IntShortPredicate predicate)
void
remove(int key)
void
removeKey(int key)
short
removeKeyIfAbsent(int key, short value)
IntShortHashMap
select(IntShortPredicate predicate)
MutableShortIterator
shortIterator()
ImmutableIntShortMap
toImmutable()
String
toString()
boolean
trimToSize()
short
updateValue(int key, short initialValueIfAbsent, ShortToShortFunction function)
void
updateValues(IntShortToShortFunction function)
MutableShortCollection
values()
IntShortHashMap
withKeysValues(int key1, short value1, int key2, short value2)
IntShortHashMap
withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
IntShortHashMap
withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
IntShortHashMap
withKeyValue(int key1, short value1)
IntShortHashMap
withoutAllKeys(IntIterable keys)
IntShortHashMap
withoutKey(int key)
void
writeExternal(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:
equals
in interfaceIntShortMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceIntShortMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceIntShortMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractShortIterable
-
shortIterator
public MutableShortIterator shortIterator()
- Specified by:
shortIterator
in interfaceMutableShortValuesMap
- Specified by:
shortIterator
in interfaceShortIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceShortIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableIntKeysMap
- Specified by:
clear
in interfaceMutableShortValuesMap
-
put
public void put(int key, short value)
- Specified by:
put
in interfaceMutableIntShortMap
-
putAll
public void putAll(IntShortMap map)
- Specified by:
putAll
in interfaceMutableIntShortMap
-
updateValues
public void updateValues(IntShortToShortFunction function)
- Specified by:
updateValues
in interfaceMutableIntShortMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKey
in interfaceMutableIntKeysMap
- Specified by:
removeKey
in interfaceMutableIntShortMap
-
remove
public void remove(int key)
- Specified by:
remove
in interfaceMutableIntShortMap
-
removeKeyIfAbsent
public short removeKeyIfAbsent(int key, short value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableIntShortMap
-
getIfAbsentPut
public short getIfAbsentPut(int key, short value)
- Specified by:
getIfAbsentPut
in interfaceMutableIntShortMap
-
getAndPut
public short getAndPut(int key, short putValue, short defaultValue)
- Specified by:
getAndPut
in interfaceMutableIntShortMap
-
getIfAbsentPut
public short getIfAbsentPut(int key, ShortFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableIntShortMap
-
getIfAbsentPutWith
public <P> short getIfAbsentPutWith(int key, ShortFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableIntShortMap
-
getIfAbsentPutWithKey
public short getIfAbsentPutWithKey(int key, IntToShortFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableIntShortMap
-
addToValue
public short addToValue(int key, short toBeAdded)
- Specified by:
addToValue
in interfaceMutableIntShortMap
-
updateValue
public short updateValue(int key, short initialValueIfAbsent, ShortToShortFunction function)
- Specified by:
updateValue
in interfaceMutableIntShortMap
-
withKeyValue
public IntShortHashMap withKeyValue(int key1, short value1)
- Specified by:
withKeyValue
in 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:
withoutKey
in interfaceMutableIntShortMap
-
withoutAllKeys
public IntShortHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableIntShortMap
-
asUnmodifiable
public MutableIntShortMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntShortMap
-
asSynchronized
public MutableIntShortMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntShortMap
-
toImmutable
public ImmutableIntShortMap toImmutable()
- Specified by:
toImmutable
in interfaceIntShortMap
-
get
public short get(int key)
- Specified by:
get
in interfaceIntShortMap
-
getIfAbsent
public short getIfAbsent(int key, short ifAbsent)
- Specified by:
getIfAbsent
in interfaceIntShortMap
-
getOrThrow
public short getOrThrow(int key)
- Specified by:
getOrThrow
in interfaceIntShortMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interfaceIntKeysMap
- Specified by:
containsKey
in interfaceIntShortMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKey
in interfaceIntKeysMap
- Specified by:
forEachKey
in interfaceIntShortMap
-
forEachKeyValue
public void forEachKeyValue(IntShortProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceIntShortMap
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysView
in interfaceIntShortMap
-
keyValuesView
public RichIterable<IntShortPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceIntShortMap
-
flipUniqueValues
public MutableShortIntMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceIntShortMap
- Specified by:
flipUniqueValues
in interfaceMutableIntShortMap
-
select
public IntShortHashMap select(IntShortPredicate predicate)
- Specified by:
select
in interfaceIntShortMap
- Specified by:
select
in interfaceMutableIntShortMap
-
reject
public IntShortHashMap reject(IntShortPredicate predicate)
- Specified by:
reject
in interfaceIntShortMap
- Specified by:
reject
in interfaceMutableIntShortMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
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:
keySet
in interfaceIntShortMap
-
values
public MutableShortCollection values()
- Specified by:
values
in interfaceShortValuesMap
-
-