public class CharIntHashMap extends AbstractMutableIntValuesMap implements MutableCharIntMap, Externalizable, MutableCharKeysMap
Constructor and Description |
---|
CharIntHashMap() |
CharIntHashMap(CharIntMap map) |
CharIntHashMap(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
int |
addToValue(char key,
int toBeAdded) |
MutableCharIntMap |
asSynchronized() |
MutableCharIntMap |
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(CharIntProcedure procedure) |
int |
get(char key) |
int |
getIfAbsent(char key,
int ifAbsent) |
int |
getIfAbsentPut(char key,
int value) |
int |
getIfAbsentPut(char key,
IntFunction0 function) |
<P> int |
getIfAbsentPutWith(char key,
IntFunction<? super P> function,
P parameter) |
int |
getIfAbsentPutWithKey(char key,
CharToIntFunction function) |
int |
getOrThrow(char key) |
int |
hashCode()
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectIntToObjectFunction<? super V,? extends V> function) |
MutableIntIterator |
intIterator() |
MutableCharSet |
keySet() |
LazyCharIterable |
keysView() |
RichIterable<CharIntPair> |
keyValuesView() |
static CharIntHashMap |
newWithKeysValues(char key1,
int value1) |
static CharIntHashMap |
newWithKeysValues(char key1,
int value1,
char key2,
int value2) |
static CharIntHashMap |
newWithKeysValues(char key1,
int value1,
char key2,
int value2,
char key3,
int value3) |
static CharIntHashMap |
newWithKeysValues(char key1,
int value1,
char key2,
int value2,
char key3,
int value3,
char key4,
int value4) |
void |
put(char key,
int value) |
void |
putAll(CharIntMap map) |
void |
readExternal(ObjectInput in) |
CharIntHashMap |
reject(CharIntPredicate predicate) |
void |
remove(char key) |
void |
removeKey(char key) |
int |
removeKeyIfAbsent(char key,
int value) |
CharIntHashMap |
select(CharIntPredicate predicate) |
ImmutableCharIntMap |
toImmutable() |
String |
toString()
Returns a string representation of this PrimitiveIterable.
|
int |
updateValue(char key,
int initialValueIfAbsent,
IntToIntFunction function) |
MutableIntCollection |
values() |
CharIntHashMap |
withKeysValues(char key1,
int value1,
char key2,
int value2) |
CharIntHashMap |
withKeysValues(char key1,
int value1,
char key2,
int value2,
char key3,
int value3) |
CharIntHashMap |
withKeysValues(char key1,
int value1,
char key2,
int value2,
char key3,
int value3,
char key4,
int value4) |
CharIntHashMap |
withKeyValue(char key1,
int value1) |
CharIntHashMap |
withoutAllKeys(CharIterable keys) |
CharIntHashMap |
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
collect, reject, select
containsValue, forEachValue
allSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
isEmpty, notEmpty, size
public CharIntHashMap()
public CharIntHashMap(int initialCapacity)
public CharIntHashMap(CharIntMap map)
public static CharIntHashMap newWithKeysValues(char key1, int value1)
public static CharIntHashMap newWithKeysValues(char key1, int value1, char key2, int value2)
public static CharIntHashMap newWithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3)
public static CharIntHashMap newWithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3, char key4, int value4)
public boolean equals(Object obj)
CharIntMap
Map.equals(Object)
.equals
in interface CharIntMap
equals
in class Object
public int hashCode()
CharIntMap
Map.hashCode()
.hashCode
in interface CharIntMap
hashCode
in class Object
public String toString()
PrimitiveIterable
toString
in interface CharIntMap
toString
in interface PrimitiveIterable
toString
in class AbstractIntIterable
public MutableIntIterator intIterator()
intIterator
in interface IntIterable
intIterator
in interface MutableIntValuesMap
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto
in interface IntIterable
public void clear()
clear
in interface MutableIntValuesMap
clear
in interface MutableCharKeysMap
public void put(char key, int value)
put
in interface MutableCharIntMap
public void putAll(CharIntMap map)
putAll
in interface MutableCharIntMap
public void removeKey(char key)
removeKey
in interface MutableCharIntMap
removeKey
in interface MutableCharKeysMap
public void remove(char key)
remove
in interface MutableCharIntMap
public int removeKeyIfAbsent(char key, int value)
removeKeyIfAbsent
in interface MutableCharIntMap
public int getIfAbsentPut(char key, int value)
getIfAbsentPut
in interface MutableCharIntMap
public int getIfAbsentPut(char key, IntFunction0 function)
getIfAbsentPut
in interface MutableCharIntMap
public <P> int getIfAbsentPutWith(char key, IntFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableCharIntMap
public int getIfAbsentPutWithKey(char key, CharToIntFunction function)
getIfAbsentPutWithKey
in interface MutableCharIntMap
public int addToValue(char key, int toBeAdded)
addToValue
in interface MutableCharIntMap
public int updateValue(char key, int initialValueIfAbsent, IntToIntFunction function)
updateValue
in interface MutableCharIntMap
public CharIntHashMap withKeyValue(char key1, int value1)
withKeyValue
in interface MutableCharIntMap
public CharIntHashMap withKeysValues(char key1, int value1, char key2, int value2)
public CharIntHashMap withKeysValues(char key1, int value1, char key2, int value2, char key3, int value3)
public CharIntHashMap withKeysValues(char key1, int value1, char key2, int value2, char key3, int value3, char key4, int value4)
public CharIntHashMap withoutKey(char key)
withoutKey
in interface MutableCharIntMap
public CharIntHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys
in interface MutableCharIntMap
public MutableCharIntMap asUnmodifiable()
asUnmodifiable
in interface MutableCharIntMap
public MutableCharIntMap asSynchronized()
asSynchronized
in interface MutableCharIntMap
public ImmutableCharIntMap toImmutable()
toImmutable
in interface CharIntMap
public int get(char key)
get
in interface CharIntMap
public int getIfAbsent(char key, int ifAbsent)
getIfAbsent
in interface CharIntMap
public int getOrThrow(char key)
getOrThrow
in interface CharIntMap
public boolean containsKey(char key)
containsKey
in interface CharIntMap
containsKey
in interface CharKeysMap
public void forEachKey(CharProcedure procedure)
forEachKey
in interface CharIntMap
forEachKey
in interface CharKeysMap
public void forEachKeyValue(CharIntProcedure procedure)
forEachKeyValue
in interface CharIntMap
public LazyCharIterable keysView()
keysView
in interface CharIntMap
public RichIterable<CharIntPair> keyValuesView()
keyValuesView
in interface CharIntMap
public CharIntHashMap select(CharIntPredicate predicate)
select
in interface CharIntMap
select
in interface MutableCharIntMap
public CharIntHashMap reject(CharIntPredicate predicate)
reject
in interface CharIntMap
reject
in interface MutableCharIntMap
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 CharIntMap
public MutableIntCollection values()
values
in interface IntValuesMap
Copyright © 2004–2016. All rights reserved.