Externalizable
, Serializable
, CharShortMap
, MutableCharShortMap
, MutableShortValuesMap
, ShortValuesMap
, PrimitiveIterable
, ShortIterable
, MutableCharKeysMap
, CharKeysMap
public class CharShortHashMap extends AbstractMutableShortValuesMap implements MutableCharShortMap, Externalizable, MutableCharKeysMap
Constructor | Description |
---|---|
CharShortHashMap() |
|
CharShortHashMap(int initialCapacity) |
|
CharShortHashMap(CharShortMap map) |
Modifier and Type | Method | Description |
---|---|---|
short |
addToValue(char key,
short toBeAdded) |
|
MutableCharShortMap |
asSynchronized() |
|
MutableCharShortMap |
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(char key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(CharProcedure procedure) |
|
void |
forEachKeyValue(CharShortProcedure procedure) |
|
short |
get(char key) |
|
short |
getIfAbsent(char key,
short ifAbsent) |
|
short |
getIfAbsentPut(char key,
short value) |
|
short |
getIfAbsentPut(char key,
ShortFunction0 function) |
|
<P> short |
getIfAbsentPutWith(char key,
ShortFunction<? super P> function,
P parameter) |
|
short |
getIfAbsentPutWithKey(char key,
CharToShortFunction function) |
|
short |
getOrThrow(char key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function) |
|
MutableCharSet |
keySet() |
|
LazyCharIterable |
keysView() |
|
RichIterable<CharShortPair> |
keyValuesView() |
|
static CharShortHashMap |
newWithKeysValues(char key1,
short value1) |
|
static CharShortHashMap |
newWithKeysValues(char key1,
short value1,
char key2,
short value2) |
|
static CharShortHashMap |
newWithKeysValues(char key1,
short value1,
char key2,
short value2,
char key3,
short value3) |
|
static CharShortHashMap |
newWithKeysValues(char key1,
short value1,
char key2,
short value2,
char key3,
short value3,
char key4,
short value4) |
|
void |
put(char key,
short value) |
|
void |
putAll(CharShortMap map) |
|
void |
readExternal(ObjectInput in) |
|
CharShortHashMap |
reject(CharShortPredicate predicate) |
|
void |
remove(char key) |
|
void |
removeKey(char key) |
|
short |
removeKeyIfAbsent(char key,
short value) |
|
CharShortHashMap |
select(CharShortPredicate predicate) |
|
MutableShortIterator |
shortIterator() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
ImmutableCharShortMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
short |
updateValue(char key,
short initialValueIfAbsent,
ShortToShortFunction function) |
|
MutableShortCollection |
values() |
|
CharShortHashMap |
withKeysValues(char key1,
short value1,
char key2,
short value2) |
|
CharShortHashMap |
withKeysValues(char key1,
short value1,
char key2,
short value2,
char key3,
short value3) |
|
CharShortHashMap |
withKeysValues(char key1,
short value1,
char key2,
short value2,
char key3,
short value3,
char key4,
short value4) |
|
CharShortHashMap |
withKeyValue(char key1,
short value1) |
|
CharShortHashMap |
withoutAllKeys(CharIterable keys) |
|
CharShortHashMap |
withoutKey(char key) |
|
void |
writeExternal(ObjectOutput out) |
allSatisfy, anySatisfy, appendString, 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
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
allSatisfy, anySatisfy, asLazy, average, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue
public CharShortHashMap()
public CharShortHashMap(int initialCapacity)
public CharShortHashMap(CharShortMap map)
public static CharShortHashMap newWithKeysValues(char key1, short value1)
public static CharShortHashMap newWithKeysValues(char key1, short value1, char key2, short value2)
public static CharShortHashMap newWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)
public static CharShortHashMap newWithKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)
public boolean equals(Object obj)
CharShortMap
Map.equals(Object)
.equals
in interface CharShortMap
equals
in class Object
public int hashCode()
CharShortMap
Map.hashCode()
.hashCode
in interface CharShortMap
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 CharShortMap
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 MutableCharKeysMap
clear
in interface MutableShortValuesMap
public void put(char key, short value)
put
in interface MutableCharShortMap
public void putAll(CharShortMap map)
putAll
in interface MutableCharShortMap
public void removeKey(char key)
removeKey
in interface MutableCharKeysMap
removeKey
in interface MutableCharShortMap
public void remove(char key)
remove
in interface MutableCharShortMap
public short removeKeyIfAbsent(char key, short value)
removeKeyIfAbsent
in interface MutableCharShortMap
public short getIfAbsentPut(char key, short value)
getIfAbsentPut
in interface MutableCharShortMap
public short getIfAbsentPut(char key, ShortFunction0 function)
getIfAbsentPut
in interface MutableCharShortMap
public <P> short getIfAbsentPutWith(char key, ShortFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableCharShortMap
public short getIfAbsentPutWithKey(char key, CharToShortFunction function)
getIfAbsentPutWithKey
in interface MutableCharShortMap
public short addToValue(char key, short toBeAdded)
addToValue
in interface MutableCharShortMap
public short updateValue(char key, short initialValueIfAbsent, ShortToShortFunction function)
updateValue
in interface MutableCharShortMap
public CharShortHashMap withKeyValue(char key1, short value1)
withKeyValue
in interface MutableCharShortMap
public CharShortHashMap withKeysValues(char key1, short value1, char key2, short value2)
public CharShortHashMap withKeysValues(char key1, short value1, char key2, short value2, char key3, short value3)
public CharShortHashMap withKeysValues(char key1, short value1, char key2, short value2, char key3, short value3, char key4, short value4)
public CharShortHashMap withoutKey(char key)
withoutKey
in interface MutableCharShortMap
public CharShortHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys
in interface MutableCharShortMap
public MutableCharShortMap asUnmodifiable()
asUnmodifiable
in interface MutableCharShortMap
public MutableCharShortMap asSynchronized()
asSynchronized
in interface MutableCharShortMap
public ImmutableCharShortMap toImmutable()
toImmutable
in interface CharShortMap
public short get(char key)
get
in interface CharShortMap
public short getIfAbsent(char key, short ifAbsent)
getIfAbsent
in interface CharShortMap
public short getOrThrow(char key)
getOrThrow
in interface CharShortMap
public boolean containsKey(char key)
containsKey
in interface CharKeysMap
containsKey
in interface CharShortMap
public void forEachKey(CharProcedure procedure)
forEachKey
in interface CharKeysMap
forEachKey
in interface CharShortMap
public void forEachKeyValue(CharShortProcedure procedure)
forEachKeyValue
in interface CharShortMap
public LazyCharIterable keysView()
keysView
in interface CharShortMap
public RichIterable<CharShortPair> keyValuesView()
keyValuesView
in interface CharShortMap
public CharShortHashMap select(CharShortPredicate predicate)
select
in interface CharShortMap
select
in interface MutableCharShortMap
public CharShortHashMap reject(CharShortPredicate predicate)
reject
in interface CharShortMap
reject
in interface MutableCharShortMap
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 MutableCharSet keySet()
keySet
in interface CharShortMap
public MutableShortCollection values()
values
in interface ShortValuesMap
Copyright © 2004–2017. All rights reserved.