java.io.Externalizable, java.io.Serializable, CharShortMap, MutableCharShortMap, MutableShortValuesMap, ShortValuesMap, PrimitiveIterable, ShortIterable, MutableCharKeysMap, CharKeysMappublic class CharShortHashMap extends AbstractMutableShortValuesMap implements MutableCharShortMap, java.io.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(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableShortCharMap |
flipUniqueValues() |
Return the ShortCharMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
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(java.io.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() |
|
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(char key,
short initialValueIfAbsent,
ShortToShortFunction function) |
|
void |
updateValues(CharShortToShortFunction function) |
Updates the values in-place.
|
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(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, toSortedListisEmpty, notEmpty, sizeputPair, 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, toSortedListcontainsValue, forEachValue, tappublic 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(java.lang.Object obj)
CharShortMapMap.equals(Object).equals in interface CharShortMapequals in class java.lang.Objectpublic int hashCode()
CharShortMapMap.hashCode().hashCode in interface CharShortMaphashCode 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 CharShortMaptoString 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 MutableCharKeysMapclear in interface MutableShortValuesMappublic void put(char key,
short value)
put in interface MutableCharShortMappublic void putAll(CharShortMap map)
putAll in interface MutableCharShortMappublic void updateValues(CharShortToShortFunction function)
MutableCharShortMapupdateValues in interface MutableCharShortMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(char key)
removeKey in interface MutableCharKeysMapremoveKey in interface MutableCharShortMappublic void remove(char key)
remove in interface MutableCharShortMappublic short removeKeyIfAbsent(char key,
short value)
removeKeyIfAbsent in interface MutableCharShortMappublic short getIfAbsentPut(char key,
short value)
getIfAbsentPut in interface MutableCharShortMappublic short getIfAbsentPut(char key,
ShortFunction0 function)
getIfAbsentPut in interface MutableCharShortMappublic <P> short getIfAbsentPutWith(char key,
ShortFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableCharShortMappublic short getIfAbsentPutWithKey(char key,
CharToShortFunction function)
getIfAbsentPutWithKey in interface MutableCharShortMappublic short addToValue(char key,
short toBeAdded)
addToValue in interface MutableCharShortMappublic short updateValue(char key,
short initialValueIfAbsent,
ShortToShortFunction function)
updateValue in interface MutableCharShortMappublic CharShortHashMap withKeyValue(char key1, short value1)
withKeyValue in interface MutableCharShortMappublic 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 MutableCharShortMappublic CharShortHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys in interface MutableCharShortMappublic MutableCharShortMap asUnmodifiable()
asUnmodifiable in interface MutableCharShortMappublic MutableCharShortMap asSynchronized()
asSynchronized in interface MutableCharShortMappublic ImmutableCharShortMap toImmutable()
toImmutable in interface CharShortMappublic short get(char key)
get in interface CharShortMappublic short getIfAbsent(char key,
short ifAbsent)
getIfAbsent in interface CharShortMappublic short getOrThrow(char key)
getOrThrow in interface CharShortMappublic boolean containsKey(char key)
containsKey in interface CharKeysMapcontainsKey in interface CharShortMappublic void forEachKey(CharProcedure procedure)
forEachKey in interface CharKeysMapforEachKey in interface CharShortMappublic void forEachKeyValue(CharShortProcedure procedure)
forEachKeyValue in interface CharShortMappublic LazyCharIterable keysView()
keysView in interface CharShortMappublic RichIterable<CharShortPair> keyValuesView()
keyValuesView in interface CharShortMappublic MutableShortCharMap flipUniqueValues()
CharShortMapflipUniqueValues in interface CharShortMapflipUniqueValues in interface MutableCharShortMappublic CharShortHashMap select(CharShortPredicate predicate)
select in interface CharShortMapselect in interface MutableCharShortMappublic CharShortHashMap reject(CharShortPredicate predicate)
reject in interface CharShortMapreject in interface MutableCharShortMappublic 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 MutableCharSet keySet()
keySet in interface CharShortMappublic MutableShortCollection values()
values in interface ShortValuesMapCopyright © 2004–2020. All rights reserved.