Externalizable
, Serializable
, IntShortMap
, MutableIntShortMap
, MutableShortValuesMap
, ShortValuesMap
, PrimitiveIterable
, ShortIterable
, MutableIntKeysMap
, IntKeysMap
public class IntShortHashMap extends AbstractMutableShortValuesMap implements MutableIntShortMap, 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(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(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() |
|
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) |
|
void |
updateValues(IntShortToShortFunction function) |
Updates the values in-place.
|
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) |
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
isEmpty, notEmpty, size
putPair, withAllKeyValues
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
allSatisfy, 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, toSortedList
containsValue, forEachValue, tap
public 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(Object obj)
IntShortMap
Map.equals(Object)
.equals
in interface IntShortMap
equals
in class Object
public int hashCode()
IntShortMap
Map.hashCode()
.hashCode
in interface IntShortMap
hashCode
in class Object
public 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 IntShortMap
toString
in interface PrimitiveIterable
toString
in class AbstractShortIterable
AbstractCollection.toString()
public MutableShortIterator shortIterator()
ShortIterable
shortIterator
in interface MutableShortValuesMap
shortIterator
in interface ShortIterable
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
injectInto
in interface ShortIterable
public void clear()
clear
in interface MutableIntKeysMap
clear
in interface MutableShortValuesMap
public void put(int key, short value)
put
in interface MutableIntShortMap
public void putAll(IntShortMap map)
putAll
in interface MutableIntShortMap
public void updateValues(IntShortToShortFunction function)
MutableIntShortMap
updateValues
in interface MutableIntShortMap
function
- that takes a key and its value and that returns a new value for this keypublic void removeKey(int key)
removeKey
in interface MutableIntKeysMap
removeKey
in interface MutableIntShortMap
public void remove(int key)
remove
in interface MutableIntShortMap
public short removeKeyIfAbsent(int key, short value)
removeKeyIfAbsent
in interface MutableIntShortMap
public short getIfAbsentPut(int key, short value)
getIfAbsentPut
in interface MutableIntShortMap
public short getIfAbsentPut(int key, ShortFunction0 function)
getIfAbsentPut
in interface MutableIntShortMap
public <P> short getIfAbsentPutWith(int key, ShortFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableIntShortMap
public short getIfAbsentPutWithKey(int key, IntToShortFunction function)
getIfAbsentPutWithKey
in interface MutableIntShortMap
public short addToValue(int key, short toBeAdded)
addToValue
in interface MutableIntShortMap
public short updateValue(int key, short initialValueIfAbsent, ShortToShortFunction function)
updateValue
in interface MutableIntShortMap
public IntShortHashMap withKeyValue(int key1, short value1)
withKeyValue
in interface MutableIntShortMap
public 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 MutableIntShortMap
public IntShortHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys
in interface MutableIntShortMap
public MutableIntShortMap asUnmodifiable()
asUnmodifiable
in interface MutableIntShortMap
public MutableIntShortMap asSynchronized()
asSynchronized
in interface MutableIntShortMap
public ImmutableIntShortMap toImmutable()
toImmutable
in interface IntShortMap
public short get(int key)
get
in interface IntShortMap
public short getIfAbsent(int key, short ifAbsent)
getIfAbsent
in interface IntShortMap
public short getOrThrow(int key)
getOrThrow
in interface IntShortMap
public boolean containsKey(int key)
containsKey
in interface IntKeysMap
containsKey
in interface IntShortMap
public void forEachKey(IntProcedure procedure)
forEachKey
in interface IntKeysMap
forEachKey
in interface IntShortMap
public void forEachKeyValue(IntShortProcedure procedure)
forEachKeyValue
in interface IntShortMap
public LazyIntIterable keysView()
keysView
in interface IntShortMap
public RichIterable<IntShortPair> keyValuesView()
keyValuesView
in interface IntShortMap
public MutableShortIntMap flipUniqueValues()
IntShortMap
flipUniqueValues
in interface IntShortMap
flipUniqueValues
in interface MutableIntShortMap
public IntShortHashMap select(IntShortPredicate predicate)
select
in interface IntShortMap
select
in interface MutableIntShortMap
public IntShortHashMap reject(IntShortPredicate predicate)
reject
in interface IntShortMap
reject
in interface MutableIntShortMap
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void compact()
public MutableIntSet keySet()
keySet
in interface IntShortMap
public MutableShortCollection values()
values
in interface ShortValuesMap
Copyright © 2004–2019. All rights reserved.