public class CharIntHashMap extends AbstractMutableIntValuesMap implements com.gs.collections.api.map.primitive.MutableCharIntMap, java.io.Externalizable, MutableCharKeysMap
AbstractMutableIntValuesMap.AbstractIntValuesCollection, AbstractMutableIntValuesMap.SentinelValues| Constructor and Description |
|---|
CharIntHashMap() |
CharIntHashMap(com.gs.collections.api.map.primitive.CharIntMap map) |
CharIntHashMap(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
addToValue(char key,
int toBeAdded) |
com.gs.collections.api.map.primitive.MutableCharIntMap |
asSynchronized() |
com.gs.collections.api.map.primitive.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(java.lang.Object obj)
Follows the same general contract as
Map.equals(Object). |
void |
forEachKey(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure) |
void |
forEachKeyValue(com.gs.collections.api.block.procedure.primitive.CharIntProcedure procedure) |
int |
get(char key) |
protected int |
getEmptyValue() |
int |
getIfAbsent(char key,
int ifAbsent) |
int |
getIfAbsentPut(char key,
int value) |
int |
getIfAbsentPut(char key,
com.gs.collections.api.block.function.primitive.IntFunction0 function) |
<P> int |
getIfAbsentPutWith(char key,
com.gs.collections.api.block.function.primitive.IntFunction<? super P> function,
P parameter) |
int |
getIfAbsentPutWithKey(char key,
com.gs.collections.api.block.function.primitive.CharToIntFunction function) |
protected int |
getOccupiedWithData() |
int |
getOrThrow(char key) |
protected AbstractMutableIntValuesMap.SentinelValues |
getSentinelValues() |
protected int |
getTableSize() |
protected int |
getValueAtIndex(int index) |
int |
hashCode()
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectIntToObjectFunction<? super V,? extends V> function) |
com.gs.collections.api.iterator.MutableIntIterator |
intIterator() |
protected boolean |
isNonSentinelAtIndex(int index) |
com.gs.collections.api.set.primitive.MutableCharSet |
keySet() |
com.gs.collections.api.LazyCharIterable |
keysView() |
com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.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(com.gs.collections.api.map.primitive.CharIntMap map) |
void |
readExternal(java.io.ObjectInput in) |
CharIntHashMap |
reject(com.gs.collections.api.block.predicate.primitive.CharIntPredicate predicate) |
void |
remove(char key) |
void |
removeKey(char key) |
int |
removeKeyIfAbsent(char key,
int value) |
CharIntHashMap |
select(com.gs.collections.api.block.predicate.primitive.CharIntPredicate predicate) |
protected void |
setSentinelValuesNull() |
com.gs.collections.api.map.primitive.ImmutableCharIntMap |
toImmutable() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
int |
updateValue(char key,
int initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.IntToIntFunction function) |
com.gs.collections.api.collection.primitive.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(com.gs.collections.api.CharIterable keys) |
CharIntHashMap |
withoutKey(char key) |
void |
writeExternal(java.io.ObjectOutput out) |
addEmptyKeyValue, addRemovedKeyValue, allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, removeEmptyKey, removeRemovedKey, select, size, sum, toArrayappendString, appendString, asLazy, average, containsAll, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListclone, finalize, getClass, notify, notifyAll, wait, wait, waitcollect, reject, selectcontainsValue, forEachValueallSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeisEmpty, notEmpty, sizepublic CharIntHashMap()
public CharIntHashMap(int initialCapacity)
public CharIntHashMap(com.gs.collections.api.map.primitive.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)
protected int getOccupiedWithData()
getOccupiedWithData in class AbstractMutableIntValuesMapprotected AbstractMutableIntValuesMap.SentinelValues getSentinelValues()
getSentinelValues in class AbstractMutableIntValuesMapprotected void setSentinelValuesNull()
setSentinelValuesNull in class AbstractMutableIntValuesMapprotected int getEmptyValue()
getEmptyValue in class AbstractMutableIntValuesMapprotected int getTableSize()
getTableSize in class AbstractMutableIntValuesMapprotected int getValueAtIndex(int index)
getValueAtIndex in class AbstractMutableIntValuesMappublic boolean equals(java.lang.Object obj)
com.gs.collections.api.map.primitive.CharIntMapMap.equals(Object).equals in interface com.gs.collections.api.map.primitive.CharIntMapequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.map.primitive.CharIntMapMap.hashCode().hashCode in interface com.gs.collections.api.map.primitive.CharIntMaphashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.map.primitive.CharIntMaptoString in interface com.gs.collections.api.PrimitiveIterabletoString in class AbstractIntIterablepublic com.gs.collections.api.iterator.MutableIntIterator intIterator()
intIterator in interface com.gs.collections.api.IntIterableintIterator in interface com.gs.collections.api.map.primitive.MutableIntValuesMappublic <V> V injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectIntToObjectFunction<? super V,? extends V> function)
injectInto in interface com.gs.collections.api.IntIterablepublic void clear()
clear in interface com.gs.collections.api.map.primitive.MutableIntValuesMapclear in interface MutableCharKeysMappublic void put(char key,
int value)
put in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic void putAll(com.gs.collections.api.map.primitive.CharIntMap map)
putAll in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic void removeKey(char key)
removeKey in interface com.gs.collections.api.map.primitive.MutableCharIntMapremoveKey in interface MutableCharKeysMappublic void remove(char key)
remove in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic int removeKeyIfAbsent(char key,
int value)
removeKeyIfAbsent in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic int getIfAbsentPut(char key,
int value)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic int getIfAbsentPut(char key,
com.gs.collections.api.block.function.primitive.IntFunction0 function)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic <P> int getIfAbsentPutWith(char key,
com.gs.collections.api.block.function.primitive.IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic int getIfAbsentPutWithKey(char key,
com.gs.collections.api.block.function.primitive.CharToIntFunction function)
getIfAbsentPutWithKey in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic int addToValue(char key,
int toBeAdded)
addToValue in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic int updateValue(char key,
int initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.IntToIntFunction function)
updateValue in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic CharIntHashMap withKeyValue(char key1, int value1)
withKeyValue in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic 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 com.gs.collections.api.map.primitive.MutableCharIntMappublic CharIntHashMap withoutAllKeys(com.gs.collections.api.CharIterable keys)
withoutAllKeys in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic com.gs.collections.api.map.primitive.MutableCharIntMap asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic com.gs.collections.api.map.primitive.MutableCharIntMap asSynchronized()
asSynchronized in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic com.gs.collections.api.map.primitive.ImmutableCharIntMap toImmutable()
toImmutable in interface com.gs.collections.api.map.primitive.CharIntMappublic int get(char key)
get in interface com.gs.collections.api.map.primitive.CharIntMappublic int getIfAbsent(char key,
int ifAbsent)
getIfAbsent in interface com.gs.collections.api.map.primitive.CharIntMappublic int getOrThrow(char key)
getOrThrow in interface com.gs.collections.api.map.primitive.CharIntMappublic boolean containsKey(char key)
containsKey in interface com.gs.collections.api.map.primitive.CharIntMapcontainsKey in interface CharKeysMappublic void forEachKey(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure)
forEachKey in interface com.gs.collections.api.map.primitive.CharIntMapforEachKey in interface CharKeysMappublic void forEachKeyValue(com.gs.collections.api.block.procedure.primitive.CharIntProcedure procedure)
forEachKeyValue in interface com.gs.collections.api.map.primitive.CharIntMappublic com.gs.collections.api.LazyCharIterable keysView()
keysView in interface com.gs.collections.api.map.primitive.CharIntMappublic com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.CharIntPair> keyValuesView()
keyValuesView in interface com.gs.collections.api.map.primitive.CharIntMappublic CharIntHashMap select(com.gs.collections.api.block.predicate.primitive.CharIntPredicate predicate)
select in interface com.gs.collections.api.map.primitive.CharIntMapselect in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic CharIntHashMap reject(com.gs.collections.api.block.predicate.primitive.CharIntPredicate predicate)
reject in interface com.gs.collections.api.map.primitive.CharIntMapreject in interface com.gs.collections.api.map.primitive.MutableCharIntMappublic 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()
protected boolean isNonSentinelAtIndex(int index)
isNonSentinelAtIndex in class AbstractMutableIntValuesMappublic com.gs.collections.api.set.primitive.MutableCharSet keySet()
keySet in interface com.gs.collections.api.map.primitive.CharIntMappublic com.gs.collections.api.collection.primitive.MutableIntCollection values()
values in interface com.gs.collections.api.map.primitive.IntValuesMap