java.io.Externalizable, java.io.Serializable, IntIterable, IntValuesMap, MutableIntValuesMap, MutableShortIntMap, ShortIntMap, PrimitiveIterable, MutableShortKeysMap, ShortKeysMappublic class ShortIntHashMap extends AbstractMutableIntValuesMap implements MutableShortIntMap, java.io.Externalizable, MutableShortKeysMap
| Constructor | Description |
|---|---|
ShortIntHashMap() |
|
ShortIntHashMap(int initialCapacity) |
|
ShortIntHashMap(ShortIntMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
addToValue(short key,
int toBeAdded) |
|
MutableShortIntMap |
asSynchronized() |
|
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). |
MutableIntShortMap |
flipUniqueValues() |
Return the IntShortMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ShortProcedure procedure) |
|
void |
forEachKeyValue(ShortIntProcedure procedure) |
|
int |
get(short key) |
|
int |
getIfAbsent(short key,
int ifAbsent) |
|
int |
getIfAbsentPut(short key,
int value) |
|
int |
getIfAbsentPut(short key,
IntFunction0 function) |
|
<P> int |
getIfAbsentPutWith(short key,
IntFunction<? super P> function,
P parameter) |
|
int |
getIfAbsentPutWithKey(short key,
ShortToIntFunction function) |
|
int |
getOrThrow(short key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
|
MutableIntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
MutableShortSet |
keySet() |
|
LazyShortIterable |
keysView() |
|
RichIterable<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(ShortIntMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
ShortIntHashMap |
reject(ShortIntPredicate predicate) |
|
void |
remove(short key) |
|
void |
removeKey(short key) |
|
int |
removeKeyIfAbsent(short key,
int value) |
|
ShortIntHashMap |
select(ShortIntPredicate predicate) |
|
ImmutableShortIntMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
int |
updateValue(short key,
int initialValueIfAbsent,
IntToIntFunction function) |
|
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(ShortIterable keys) |
|
ShortIntHashMap |
withoutKey(short key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListcontainsValue, forEachValue, tapcollect, reject, selectputPairappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeisEmpty, notEmpty, sizepublic ShortIntHashMap()
public ShortIntHashMap(int initialCapacity)
public ShortIntHashMap(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)
public boolean equals(java.lang.Object obj)
ShortIntMapMap.equals(Object).equals in interface ShortIntMapequals in class java.lang.Objectpublic int hashCode()
ShortIntMapMap.hashCode().hashCode in interface ShortIntMaphashCode in class java.lang.Objectpublic java.lang.String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString in interface PrimitiveIterabletoString in interface ShortIntMaptoString in class AbstractIntIterableAbstractCollection.toString()public MutableIntIterator intIterator()
IntIterableintIterator in interface IntIterableintIterator in interface MutableIntValuesMappublic <V> V injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface IntIterablepublic void clear()
clear in interface MutableIntValuesMapclear in interface MutableShortKeysMappublic void put(short key,
int value)
put in interface MutableShortIntMappublic void putAll(ShortIntMap map)
putAll in interface MutableShortIntMappublic void removeKey(short key)
removeKey in interface MutableShortIntMapremoveKey in interface MutableShortKeysMappublic void remove(short key)
remove in interface MutableShortIntMappublic int removeKeyIfAbsent(short key,
int value)
removeKeyIfAbsent in interface MutableShortIntMappublic int getIfAbsentPut(short key,
int value)
getIfAbsentPut in interface MutableShortIntMappublic int getIfAbsentPut(short key,
IntFunction0 function)
getIfAbsentPut in interface MutableShortIntMappublic <P> int getIfAbsentPutWith(short key,
IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableShortIntMappublic int getIfAbsentPutWithKey(short key,
ShortToIntFunction function)
getIfAbsentPutWithKey in interface MutableShortIntMappublic int addToValue(short key,
int toBeAdded)
addToValue in interface MutableShortIntMappublic int updateValue(short key,
int initialValueIfAbsent,
IntToIntFunction function)
updateValue in interface MutableShortIntMappublic ShortIntHashMap withKeyValue(short key1, int value1)
withKeyValue in interface 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 MutableShortIntMappublic ShortIntHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys in interface MutableShortIntMappublic MutableShortIntMap asUnmodifiable()
asUnmodifiable in interface MutableShortIntMappublic MutableShortIntMap asSynchronized()
asSynchronized in interface MutableShortIntMappublic ImmutableShortIntMap toImmutable()
toImmutable in interface ShortIntMappublic int get(short key)
get in interface ShortIntMappublic int getIfAbsent(short key,
int ifAbsent)
getIfAbsent in interface ShortIntMappublic int getOrThrow(short key)
getOrThrow in interface ShortIntMappublic boolean containsKey(short key)
containsKey in interface ShortIntMapcontainsKey in interface ShortKeysMappublic void forEachKey(ShortProcedure procedure)
forEachKey in interface ShortIntMapforEachKey in interface ShortKeysMappublic void forEachKeyValue(ShortIntProcedure procedure)
forEachKeyValue in interface ShortIntMappublic LazyShortIterable keysView()
keysView in interface ShortIntMappublic RichIterable<ShortIntPair> keyValuesView()
keyValuesView in interface ShortIntMappublic MutableIntShortMap flipUniqueValues()
ShortIntMapflipUniqueValues in interface MutableShortIntMapflipUniqueValues in interface ShortIntMappublic ShortIntHashMap select(ShortIntPredicate predicate)
select in interface MutableShortIntMapselect in interface ShortIntMappublic ShortIntHashMap reject(ShortIntPredicate predicate)
reject in interface MutableShortIntMapreject in interface 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()
public MutableShortSet keySet()
keySet in interface ShortIntMappublic MutableIntCollection values()
values in interface IntValuesMapCopyright © 2004–2018. All rights reserved.