java.io.Externalizable, java.io.Serializable, IntShortMap, MutableIntShortMap, MutableShortValuesMap, ShortValuesMap, PrimitiveIterable, ShortIterable, MutableIntKeysMap, IntKeysMappublic class IntShortHashMap extends AbstractMutableShortValuesMap implements MutableIntShortMap, java.io.Externalizable, MutableIntKeysMap
| Constructor | Description |
|---|---|
IntShortHashMap() |
|
IntShortHashMap(int initialCapacity) |
|
IntShortHashMap(IntShortMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
short |
addToValue(int key,
short toBeAdded) |
|
MutableIntShortMap |
asSynchronized() |
|
MutableIntShortMap |
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(int key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableShortIntMap |
flipUniqueValues() |
Return the ShortIntMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(IntProcedure procedure) |
|
void |
forEachKeyValue(IntShortProcedure procedure) |
|
short |
get(int key) |
|
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() |
Follows the same general contract as
Map.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(java.io.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() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
ImmutableIntShortMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
short |
updateValue(int key,
short initialValueIfAbsent,
ShortToShortFunction 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(java.io.ObjectOutput out) |
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayasLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListisEmpty, notEmpty, sizecollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, 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, tappublic IntShortHashMap()
public IntShortHashMap(int initialCapacity)
public IntShortHashMap(IntShortMap map)
public static IntShortHashMap newWithKeysValues(int key1, short value1)
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2)
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
public static IntShortHashMap newWithKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
public boolean equals(java.lang.Object obj)
IntShortMapMap.equals(Object).equals in interface IntShortMapequals in class java.lang.Objectpublic int hashCode()
IntShortMapMap.hashCode().hashCode in interface IntShortMaphashCode 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 IntShortMaptoString in interface PrimitiveIterabletoString in class AbstractShortIterableAbstractCollection.toString()public MutableShortIterator shortIterator()
ShortIterableshortIterator in interface MutableShortValuesMapshortIterator in interface ShortIterablepublic <V> V injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function)
injectInto in interface ShortIterablepublic void clear()
clear in interface MutableIntKeysMapclear in interface MutableShortValuesMappublic void put(int key,
short value)
put in interface MutableIntShortMappublic void putAll(IntShortMap map)
putAll in interface MutableIntShortMappublic void removeKey(int key)
removeKey in interface MutableIntKeysMapremoveKey in interface MutableIntShortMappublic void remove(int key)
remove in interface MutableIntShortMappublic short removeKeyIfAbsent(int key,
short value)
removeKeyIfAbsent in interface MutableIntShortMappublic short getIfAbsentPut(int key,
short value)
getIfAbsentPut in interface MutableIntShortMappublic short getIfAbsentPut(int key,
ShortFunction0 function)
getIfAbsentPut in interface MutableIntShortMappublic <P> short getIfAbsentPutWith(int key,
ShortFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntShortMappublic short getIfAbsentPutWithKey(int key,
IntToShortFunction function)
getIfAbsentPutWithKey in interface MutableIntShortMappublic short addToValue(int key,
short toBeAdded)
addToValue in interface MutableIntShortMappublic short updateValue(int key,
short initialValueIfAbsent,
ShortToShortFunction function)
updateValue in interface MutableIntShortMappublic IntShortHashMap withKeyValue(int key1, short value1)
withKeyValue in interface MutableIntShortMappublic IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2)
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3)
public IntShortHashMap withKeysValues(int key1, short value1, int key2, short value2, int key3, short value3, int key4, short value4)
public IntShortHashMap withoutKey(int key)
withoutKey in interface MutableIntShortMappublic IntShortHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntShortMappublic MutableIntShortMap asUnmodifiable()
asUnmodifiable in interface MutableIntShortMappublic MutableIntShortMap asSynchronized()
asSynchronized in interface MutableIntShortMappublic ImmutableIntShortMap toImmutable()
toImmutable in interface IntShortMappublic short get(int key)
get in interface IntShortMappublic short getIfAbsent(int key,
short ifAbsent)
getIfAbsent in interface IntShortMappublic short getOrThrow(int key)
getOrThrow in interface IntShortMappublic boolean containsKey(int key)
containsKey in interface IntKeysMapcontainsKey in interface IntShortMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntKeysMapforEachKey in interface IntShortMappublic void forEachKeyValue(IntShortProcedure procedure)
forEachKeyValue in interface IntShortMappublic LazyIntIterable keysView()
keysView in interface IntShortMappublic RichIterable<IntShortPair> keyValuesView()
keyValuesView in interface IntShortMappublic MutableShortIntMap flipUniqueValues()
IntShortMapflipUniqueValues in interface IntShortMapflipUniqueValues in interface MutableIntShortMappublic IntShortHashMap select(IntShortPredicate predicate)
select in interface IntShortMapselect in interface MutableIntShortMappublic IntShortHashMap reject(IntShortPredicate predicate)
reject in interface IntShortMapreject in interface MutableIntShortMappublic 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 MutableIntSet keySet()
keySet in interface IntShortMappublic MutableShortCollection values()
values in interface ShortValuesMapCopyright © 2004–2017. All rights reserved.