java.io.Externalizable, java.io.Serializable, CharIterable, CharValuesMap, IntCharMap, MutableCharValuesMap, MutableIntCharMap, PrimitiveIterable, MutableIntKeysMap, IntKeysMappublic class IntCharHashMap extends AbstractMutableCharValuesMap implements MutableIntCharMap, java.io.Externalizable, MutableIntKeysMap
| Constructor | Description |
|---|---|
IntCharHashMap() |
|
IntCharHashMap(int initialCapacity) |
|
IntCharHashMap(IntCharMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
char |
addToValue(int key,
char toBeAdded) |
|
MutableIntCharMap |
asSynchronized() |
|
MutableIntCharMap |
asUnmodifiable() |
|
MutableCharIterator |
charIterator() |
Returns a primitive iterator that can be used to iterate over the CharIterable in an
imperative style.
|
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). |
MutableCharIntMap |
flipUniqueValues() |
Return the CharIntMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(IntProcedure procedure) |
|
void |
forEachKeyValue(IntCharProcedure procedure) |
|
char |
get(int key) |
|
char |
getIfAbsent(int key,
char ifAbsent) |
|
char |
getIfAbsentPut(int key,
char value) |
|
char |
getIfAbsentPut(int key,
CharFunction0 function) |
|
<P> char |
getIfAbsentPutWith(int key,
CharFunction<? super P> function,
P parameter) |
|
char |
getIfAbsentPutWithKey(int key,
IntToCharFunction function) |
|
char |
getOrThrow(int key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectCharToObjectFunction<? super V,? extends V> function) |
|
MutableIntSet |
keySet() |
|
LazyIntIterable |
keysView() |
|
RichIterable<IntCharPair> |
keyValuesView() |
|
static IntCharHashMap |
newWithKeysValues(int key1,
char value1) |
|
static IntCharHashMap |
newWithKeysValues(int key1,
char value1,
int key2,
char value2) |
|
static IntCharHashMap |
newWithKeysValues(int key1,
char value1,
int key2,
char value2,
int key3,
char value3) |
|
static IntCharHashMap |
newWithKeysValues(int key1,
char value1,
int key2,
char value2,
int key3,
char value3,
int key4,
char value4) |
|
void |
put(int key,
char value) |
|
void |
putAll(IntCharMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
IntCharHashMap |
reject(IntCharPredicate predicate) |
|
void |
remove(int key) |
|
void |
removeKey(int key) |
|
char |
removeKeyIfAbsent(int key,
char value) |
|
IntCharHashMap |
select(IntCharPredicate predicate) |
|
ImmutableIntCharMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
char |
updateValue(int key,
char initialValueIfAbsent,
CharToCharFunction function) |
|
void |
updateValues(IntCharToCharFunction function) |
Updates the values in-place.
|
MutableCharCollection |
values() |
|
IntCharHashMap |
withKeysValues(int key1,
char value1,
int key2,
char value2) |
|
IntCharHashMap |
withKeysValues(int key1,
char value1,
int key2,
char value2,
int key3,
char value3) |
|
IntCharHashMap |
withKeysValues(int key1,
char value1,
int key2,
char value2,
int key3,
char value3,
int key4,
char value4) |
|
IntCharHashMap |
withKeyValue(int key1,
char value1) |
|
IntCharHashMap |
withoutAllKeys(IntIterable keys) |
|
IntCharHashMap |
withoutKey(int key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayallSatisfy, 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, tapisEmpty, notEmpty, sizecollect, reject, selectputPair, withAllKeyValuesappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic IntCharHashMap()
public IntCharHashMap(int initialCapacity)
public IntCharHashMap(IntCharMap map)
public static IntCharHashMap newWithKeysValues(int key1, char value1)
public static IntCharHashMap newWithKeysValues(int key1, char value1, int key2, char value2)
public static IntCharHashMap newWithKeysValues(int key1, char value1, int key2, char value2, int key3, char value3)
public static IntCharHashMap newWithKeysValues(int key1, char value1, int key2, char value2, int key3, char value3, int key4, char value4)
public boolean equals(java.lang.Object obj)
IntCharMapMap.equals(Object).equals in interface IntCharMapequals in class java.lang.Objectpublic int hashCode()
IntCharMapMap.hashCode().hashCode in interface IntCharMaphashCode 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 IntCharMaptoString in interface PrimitiveIterabletoString in class AbstractCharIterableAbstractCollection.toString()public MutableCharIterator charIterator()
CharIterablecharIterator in interface CharIterablecharIterator in interface MutableCharValuesMappublic <V> V injectInto(V injectedValue,
ObjectCharToObjectFunction<? super V,? extends V> function)
injectInto in interface CharIterablepublic void clear()
clear in interface MutableCharValuesMapclear in interface MutableIntKeysMappublic void put(int key,
char value)
put in interface MutableIntCharMappublic void putAll(IntCharMap map)
putAll in interface MutableIntCharMappublic void updateValues(IntCharToCharFunction function)
MutableIntCharMapupdateValues in interface MutableIntCharMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(int key)
removeKey in interface MutableIntCharMapremoveKey in interface MutableIntKeysMappublic void remove(int key)
remove in interface MutableIntCharMappublic char removeKeyIfAbsent(int key,
char value)
removeKeyIfAbsent in interface MutableIntCharMappublic char getIfAbsentPut(int key,
char value)
getIfAbsentPut in interface MutableIntCharMappublic char getIfAbsentPut(int key,
CharFunction0 function)
getIfAbsentPut in interface MutableIntCharMappublic <P> char getIfAbsentPutWith(int key,
CharFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableIntCharMappublic char getIfAbsentPutWithKey(int key,
IntToCharFunction function)
getIfAbsentPutWithKey in interface MutableIntCharMappublic char addToValue(int key,
char toBeAdded)
addToValue in interface MutableIntCharMappublic char updateValue(int key,
char initialValueIfAbsent,
CharToCharFunction function)
updateValue in interface MutableIntCharMappublic IntCharHashMap withKeyValue(int key1, char value1)
withKeyValue in interface MutableIntCharMappublic IntCharHashMap withKeysValues(int key1, char value1, int key2, char value2)
public IntCharHashMap withKeysValues(int key1, char value1, int key2, char value2, int key3, char value3)
public IntCharHashMap withKeysValues(int key1, char value1, int key2, char value2, int key3, char value3, int key4, char value4)
public IntCharHashMap withoutKey(int key)
withoutKey in interface MutableIntCharMappublic IntCharHashMap withoutAllKeys(IntIterable keys)
withoutAllKeys in interface MutableIntCharMappublic MutableIntCharMap asUnmodifiable()
asUnmodifiable in interface MutableIntCharMappublic MutableIntCharMap asSynchronized()
asSynchronized in interface MutableIntCharMappublic ImmutableIntCharMap toImmutable()
toImmutable in interface IntCharMappublic char get(int key)
get in interface IntCharMappublic char getIfAbsent(int key,
char ifAbsent)
getIfAbsent in interface IntCharMappublic char getOrThrow(int key)
getOrThrow in interface IntCharMappublic boolean containsKey(int key)
containsKey in interface IntCharMapcontainsKey in interface IntKeysMappublic void forEachKey(IntProcedure procedure)
forEachKey in interface IntCharMapforEachKey in interface IntKeysMappublic void forEachKeyValue(IntCharProcedure procedure)
forEachKeyValue in interface IntCharMappublic LazyIntIterable keysView()
keysView in interface IntCharMappublic RichIterable<IntCharPair> keyValuesView()
keyValuesView in interface IntCharMappublic MutableCharIntMap flipUniqueValues()
IntCharMapflipUniqueValues in interface IntCharMapflipUniqueValues in interface MutableIntCharMappublic IntCharHashMap select(IntCharPredicate predicate)
select in interface IntCharMapselect in interface MutableIntCharMappublic IntCharHashMap reject(IntCharPredicate predicate)
reject in interface IntCharMapreject in interface MutableIntCharMappublic 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 IntCharMappublic MutableCharCollection values()
values in interface CharValuesMapCopyright © 2004–2020. All rights reserved.