java.io.Externalizable, java.io.Serializable, MutableShortShortMap, MutableShortValuesMap, ShortShortMap, ShortValuesMap, PrimitiveIterable, ShortIterable, MutableShortKeysMap, ShortKeysMappublic class ShortShortHashMap extends AbstractMutableShortValuesMap implements MutableShortShortMap, java.io.Externalizable, MutableShortKeysMap
| Constructor | Description |
|---|---|
ShortShortHashMap() |
|
ShortShortHashMap(int initialCapacity) |
|
ShortShortHashMap(ShortShortMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
short |
addToValue(short key,
short toBeAdded) |
|
MutableShortShortMap |
asSynchronized() |
|
MutableShortShortMap |
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). |
MutableShortShortMap |
flipUniqueValues() |
Return the ShortShortMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ShortProcedure procedure) |
|
void |
forEachKeyValue(ShortShortProcedure procedure) |
|
short |
get(short key) |
|
short |
getIfAbsent(short key,
short ifAbsent) |
|
short |
getIfAbsentPut(short key,
short value) |
|
short |
getIfAbsentPut(short key,
ShortFunction0 function) |
|
<P> short |
getIfAbsentPutWith(short key,
ShortFunction<? super P> function,
P parameter) |
|
short |
getIfAbsentPutWithKey(short key,
ShortToShortFunction function) |
|
short |
getOrThrow(short key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function) |
|
MutableShortSet |
keySet() |
|
LazyShortIterable |
keysView() |
|
RichIterable<ShortShortPair> |
keyValuesView() |
|
static ShortShortHashMap |
newWithKeysValues(short key1,
short value1) |
|
static ShortShortHashMap |
newWithKeysValues(short key1,
short value1,
short key2,
short value2) |
|
static ShortShortHashMap |
newWithKeysValues(short key1,
short value1,
short key2,
short value2,
short key3,
short value3) |
|
static ShortShortHashMap |
newWithKeysValues(short key1,
short value1,
short key2,
short value2,
short key3,
short value3,
short key4,
short value4) |
|
void |
put(short key,
short value) |
|
void |
putAll(ShortShortMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
ShortShortHashMap |
reject(ShortShortPredicate predicate) |
|
void |
remove(short key) |
|
void |
removeKey(short key) |
|
short |
removeKeyIfAbsent(short key,
short value) |
|
ShortShortHashMap |
select(ShortShortPredicate predicate) |
|
MutableShortIterator |
shortIterator() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
ImmutableShortShortMap |
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(short key,
short initialValueIfAbsent,
ShortToShortFunction function) |
|
void |
updateValues(ShortShortToShortFunction function) |
Updates the values in-place.
|
MutableShortCollection |
values() |
|
ShortShortHashMap |
withKeysValues(short key1,
short value1,
short key2,
short value2) |
|
ShortShortHashMap |
withKeysValues(short key1,
short value1,
short key2,
short value2,
short key3,
short value3) |
|
ShortShortHashMap |
withKeysValues(short key1,
short value1,
short key2,
short value2,
short key3,
short value3,
short key4,
short value4) |
|
ShortShortHashMap |
withKeyValue(short key1,
short value1) |
|
ShortShortHashMap |
withoutAllKeys(ShortIterable keys) |
|
ShortShortHashMap |
withoutKey(short key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
allSatisfy, anySatisfy, appendString, chunk, 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, toSortedListputPair, withAllKeyValuescollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeallSatisfy, 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, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListisEmpty, notEmpty, sizecontainsValue, forEachValue, tappublic ShortShortHashMap()
public ShortShortHashMap(int initialCapacity)
public ShortShortHashMap(ShortShortMap map)
public static ShortShortHashMap newWithKeysValues(short key1, short value1)
public static ShortShortHashMap newWithKeysValues(short key1, short value1, short key2, short value2)
public static ShortShortHashMap newWithKeysValues(short key1, short value1, short key2, short value2, short key3, short value3)
public static ShortShortHashMap newWithKeysValues(short key1, short value1, short key2, short value2, short key3, short value3, short key4, short value4)
public boolean equals(java.lang.Object obj)
ShortShortMapMap.equals(Object).equals in interface ShortShortMapequals in class java.lang.Objectpublic int hashCode()
ShortShortMapMap.hashCode().hashCode in interface ShortShortMaphashCode 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 ShortShortMaptoString 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 MutableShortKeysMapclear in interface MutableShortValuesMappublic void put(short key,
short value)
put in interface MutableShortShortMappublic void putAll(ShortShortMap map)
putAll in interface MutableShortShortMappublic void updateValues(ShortShortToShortFunction function)
MutableShortShortMapupdateValues in interface MutableShortShortMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(short key)
removeKey in interface MutableShortKeysMapremoveKey in interface MutableShortShortMappublic void remove(short key)
remove in interface MutableShortShortMappublic short removeKeyIfAbsent(short key,
short value)
removeKeyIfAbsent in interface MutableShortShortMappublic short getIfAbsentPut(short key,
short value)
getIfAbsentPut in interface MutableShortShortMappublic short getIfAbsentPut(short key,
ShortFunction0 function)
getIfAbsentPut in interface MutableShortShortMappublic <P> short getIfAbsentPutWith(short key,
ShortFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableShortShortMappublic short getIfAbsentPutWithKey(short key,
ShortToShortFunction function)
getIfAbsentPutWithKey in interface MutableShortShortMappublic short addToValue(short key,
short toBeAdded)
addToValue in interface MutableShortShortMappublic short updateValue(short key,
short initialValueIfAbsent,
ShortToShortFunction function)
updateValue in interface MutableShortShortMappublic ShortShortHashMap withKeyValue(short key1, short value1)
withKeyValue in interface MutableShortShortMappublic ShortShortHashMap withKeysValues(short key1, short value1, short key2, short value2)
public ShortShortHashMap withKeysValues(short key1, short value1, short key2, short value2, short key3, short value3)
public ShortShortHashMap withKeysValues(short key1, short value1, short key2, short value2, short key3, short value3, short key4, short value4)
public ShortShortHashMap withoutKey(short key)
withoutKey in interface MutableShortShortMappublic ShortShortHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys in interface MutableShortShortMappublic MutableShortShortMap asUnmodifiable()
asUnmodifiable in interface MutableShortShortMappublic MutableShortShortMap asSynchronized()
asSynchronized in interface MutableShortShortMappublic ImmutableShortShortMap toImmutable()
toImmutable in interface ShortShortMappublic short get(short key)
get in interface ShortShortMappublic short getIfAbsent(short key,
short ifAbsent)
getIfAbsent in interface ShortShortMappublic short getOrThrow(short key)
getOrThrow in interface ShortShortMappublic boolean containsKey(short key)
containsKey in interface ShortKeysMapcontainsKey in interface ShortShortMappublic void forEachKey(ShortProcedure procedure)
forEachKey in interface ShortKeysMapforEachKey in interface ShortShortMappublic void forEachKeyValue(ShortShortProcedure procedure)
forEachKeyValue in interface ShortShortMappublic LazyShortIterable keysView()
keysView in interface ShortShortMappublic RichIterable<ShortShortPair> keyValuesView()
keyValuesView in interface ShortShortMappublic MutableShortShortMap flipUniqueValues()
ShortShortMapflipUniqueValues in interface MutableShortShortMapflipUniqueValues in interface ShortShortMappublic ShortShortHashMap select(ShortShortPredicate predicate)
select in interface MutableShortShortMapselect in interface ShortShortMappublic ShortShortHashMap reject(ShortShortPredicate predicate)
reject in interface MutableShortShortMapreject in interface ShortShortMappublic 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 ShortShortMappublic MutableShortCollection values()
values in interface ShortValuesMapCopyright © 2004–2020. All rights reserved.