public class ShortIntHashMap extends AbstractMutableIntValuesMap implements com.gs.collections.api.map.primitive.MutableShortIntMap, java.io.Externalizable, MutableShortKeysMap
AbstractMutableIntValuesMap.AbstractIntValuesCollection, AbstractMutableIntValuesMap.SentinelValues| Constructor and Description |
|---|
ShortIntHashMap() |
ShortIntHashMap(int initialCapacity) |
ShortIntHashMap(com.gs.collections.api.map.primitive.ShortIntMap map) |
| Modifier and Type | Method and Description |
|---|---|
int |
addToValue(short key,
int toBeAdded) |
com.gs.collections.api.map.primitive.MutableShortIntMap |
asSynchronized() |
com.gs.collections.api.map.primitive.MutableShortIntMap |
asUnmodifiable() |
void |
clear() |
void |
compact()
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
containsKey(short key) |
boolean |
equals(java.lang.Object obj)
Follows the same general contract as
Map.equals(Object). |
void |
forEachKey(com.gs.collections.api.block.procedure.primitive.ShortProcedure procedure) |
void |
forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ShortIntProcedure procedure) |
int |
get(short key) |
protected int |
getEmptyValue() |
int |
getIfAbsent(short key,
int ifAbsent) |
int |
getIfAbsentPut(short key,
int value) |
int |
getIfAbsentPut(short key,
com.gs.collections.api.block.function.primitive.IntFunction0 function) |
<P> int |
getIfAbsentPutWith(short key,
com.gs.collections.api.block.function.primitive.IntFunction<? super P> function,
P parameter) |
int |
getIfAbsentPutWithKey(short key,
com.gs.collections.api.block.function.primitive.ShortToIntFunction function) |
protected int |
getOccupiedWithData() |
int |
getOrThrow(short key) |
protected AbstractMutableIntValuesMap.SentinelValues |
getSentinelValues() |
protected int |
getTableSize() |
protected int |
getValueAtIndex(int index) |
int |
hashCode()
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectIntToObjectFunction<? super V,? extends V> function) |
com.gs.collections.api.iterator.MutableIntIterator |
intIterator() |
protected boolean |
isNonSentinelAtIndex(int index) |
com.gs.collections.api.set.primitive.MutableShortSet |
keySet() |
com.gs.collections.api.LazyShortIterable |
keysView() |
com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.ShortIntPair> |
keyValuesView() |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1) |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1,
short key2,
int value2) |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3) |
static ShortIntHashMap |
newWithKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3,
short key4,
int value4) |
void |
put(short key,
int value) |
void |
putAll(com.gs.collections.api.map.primitive.ShortIntMap map) |
void |
readExternal(java.io.ObjectInput in) |
ShortIntHashMap |
reject(com.gs.collections.api.block.predicate.primitive.ShortIntPredicate predicate) |
void |
remove(short key) |
void |
removeKey(short key) |
int |
removeKeyIfAbsent(short key,
int value) |
ShortIntHashMap |
select(com.gs.collections.api.block.predicate.primitive.ShortIntPredicate predicate) |
protected void |
setSentinelValuesNull() |
com.gs.collections.api.map.primitive.ImmutableShortIntMap |
toImmutable() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
int |
updateValue(short key,
int initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.IntToIntFunction function) |
com.gs.collections.api.collection.primitive.MutableIntCollection |
values() |
ShortIntHashMap |
withKeysValues(short key1,
int value1,
short key2,
int value2) |
ShortIntHashMap |
withKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3) |
ShortIntHashMap |
withKeysValues(short key1,
int value1,
short key2,
int value2,
short key3,
int value3,
short key4,
int value4) |
ShortIntHashMap |
withKeyValue(short key1,
int value1) |
ShortIntHashMap |
withoutAllKeys(com.gs.collections.api.ShortIterable keys) |
ShortIntHashMap |
withoutKey(short key) |
void |
writeExternal(java.io.ObjectOutput out) |
addEmptyKeyValue, addRemovedKeyValue, allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, removeEmptyKey, removeRemovedKey, select, size, sum, toArrayappendString, appendString, asLazy, average, containsAll, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListclone, finalize, getClass, notify, notifyAll, wait, wait, waitcollect, reject, selectcontainsValue, forEachValueallSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeisEmpty, notEmpty, sizepublic ShortIntHashMap()
public ShortIntHashMap(int initialCapacity)
public ShortIntHashMap(com.gs.collections.api.map.primitive.ShortIntMap map)
public static ShortIntHashMap newWithKeysValues(short key1, int value1)
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2)
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3)
public static ShortIntHashMap newWithKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4)
protected int getOccupiedWithData()
getOccupiedWithData in class AbstractMutableIntValuesMapprotected AbstractMutableIntValuesMap.SentinelValues getSentinelValues()
getSentinelValues in class AbstractMutableIntValuesMapprotected void setSentinelValuesNull()
setSentinelValuesNull in class AbstractMutableIntValuesMapprotected int getEmptyValue()
getEmptyValue in class AbstractMutableIntValuesMapprotected int getTableSize()
getTableSize in class AbstractMutableIntValuesMapprotected int getValueAtIndex(int index)
getValueAtIndex in class AbstractMutableIntValuesMappublic boolean equals(java.lang.Object obj)
com.gs.collections.api.map.primitive.ShortIntMapMap.equals(Object).equals in interface com.gs.collections.api.map.primitive.ShortIntMapequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.map.primitive.ShortIntMapMap.hashCode().hashCode in interface com.gs.collections.api.map.primitive.ShortIntMaphashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.map.primitive.ShortIntMaptoString in interface com.gs.collections.api.PrimitiveIterabletoString in class AbstractIntIterablepublic com.gs.collections.api.iterator.MutableIntIterator intIterator()
intIterator in interface com.gs.collections.api.IntIterableintIterator in interface com.gs.collections.api.map.primitive.MutableIntValuesMappublic <V> V injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface com.gs.collections.api.IntIterablepublic void clear()
clear in interface com.gs.collections.api.map.primitive.MutableIntValuesMapclear in interface MutableShortKeysMappublic void put(short key,
int value)
put in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic void putAll(com.gs.collections.api.map.primitive.ShortIntMap map)
putAll in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic void removeKey(short key)
removeKey in interface com.gs.collections.api.map.primitive.MutableShortIntMapremoveKey in interface MutableShortKeysMappublic void remove(short key)
remove in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic int removeKeyIfAbsent(short key,
int value)
removeKeyIfAbsent in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic int getIfAbsentPut(short key,
int value)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic int getIfAbsentPut(short key,
com.gs.collections.api.block.function.primitive.IntFunction0 function)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic <P> int getIfAbsentPutWith(short key,
com.gs.collections.api.block.function.primitive.IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic int getIfAbsentPutWithKey(short key,
com.gs.collections.api.block.function.primitive.ShortToIntFunction function)
getIfAbsentPutWithKey in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic int addToValue(short key,
int toBeAdded)
addToValue in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic int updateValue(short key,
int initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.IntToIntFunction function)
updateValue in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic ShortIntHashMap withKeyValue(short key1, int value1)
withKeyValue in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2)
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3)
public ShortIntHashMap withKeysValues(short key1, int value1, short key2, int value2, short key3, int value3, short key4, int value4)
public ShortIntHashMap withoutKey(short key)
withoutKey in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic ShortIntHashMap withoutAllKeys(com.gs.collections.api.ShortIterable keys)
withoutAllKeys in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic com.gs.collections.api.map.primitive.MutableShortIntMap asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic com.gs.collections.api.map.primitive.MutableShortIntMap asSynchronized()
asSynchronized in interface com.gs.collections.api.map.primitive.MutableShortIntMappublic com.gs.collections.api.map.primitive.ImmutableShortIntMap toImmutable()
toImmutable in interface com.gs.collections.api.map.primitive.ShortIntMappublic int get(short key)
get in interface com.gs.collections.api.map.primitive.ShortIntMappublic int getIfAbsent(short key,
int ifAbsent)
getIfAbsent in interface com.gs.collections.api.map.primitive.ShortIntMappublic int getOrThrow(short key)
getOrThrow in interface com.gs.collections.api.map.primitive.ShortIntMappublic boolean containsKey(short key)
containsKey in interface com.gs.collections.api.map.primitive.ShortIntMapcontainsKey in interface ShortKeysMappublic void forEachKey(com.gs.collections.api.block.procedure.primitive.ShortProcedure procedure)
forEachKey in interface com.gs.collections.api.map.primitive.ShortIntMapforEachKey in interface ShortKeysMappublic void forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ShortIntProcedure procedure)
forEachKeyValue in interface com.gs.collections.api.map.primitive.ShortIntMappublic com.gs.collections.api.LazyShortIterable keysView()
keysView in interface com.gs.collections.api.map.primitive.ShortIntMappublic com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.ShortIntPair> keyValuesView()
keyValuesView in interface com.gs.collections.api.map.primitive.ShortIntMappublic ShortIntHashMap select(com.gs.collections.api.block.predicate.primitive.ShortIntPredicate predicate)
select in interface com.gs.collections.api.map.primitive.MutableShortIntMapselect in interface com.gs.collections.api.map.primitive.ShortIntMappublic ShortIntHashMap reject(com.gs.collections.api.block.predicate.primitive.ShortIntPredicate predicate)
reject in interface com.gs.collections.api.map.primitive.MutableShortIntMapreject in interface com.gs.collections.api.map.primitive.ShortIntMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void compact()
protected boolean isNonSentinelAtIndex(int index)
isNonSentinelAtIndex in class AbstractMutableIntValuesMappublic com.gs.collections.api.set.primitive.MutableShortSet keySet()
keySet in interface com.gs.collections.api.map.primitive.ShortIntMappublic com.gs.collections.api.collection.primitive.MutableIntCollection values()
values in interface com.gs.collections.api.map.primitive.IntValuesMap