Class CharIntHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractIntIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.CharIntHashMap
-
- All Implemented Interfaces:
Externalizable,Serializable,IntIterable,CharIntMap,IntValuesMap,MutableCharIntMap,MutableIntValuesMap,PrimitiveIterable,MutableCharKeysMap,CharKeysMap
public class CharIntHashMap extends AbstractMutableIntValuesMap implements MutableCharIntMap, Externalizable, MutableCharKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CharIntHashMap()CharIntHashMap(int initialCapacity)CharIntHashMap(CharIntMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intaddToValue(char key, int toBeAdded)MutableCharIntMapasSynchronized()MutableCharIntMapasUnmodifiable()voidclear()voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontainsKey(char key)booleanequals(Object obj)MutableIntCharMapflipUniqueValues()voidforEachKey(CharProcedure procedure)voidforEachKeyValue(CharIntProcedure procedure)intget(char key)intgetAndPut(char key, int putValue, int defaultValue)intgetIfAbsent(char key, int ifAbsent)intgetIfAbsentPut(char key, int value)intgetIfAbsentPut(char key, IntFunction0 function)<P> intgetIfAbsentPutWith(char key, IntFunction<? super P> function, P parameter)intgetIfAbsentPutWithKey(char key, CharToIntFunction function)intgetOrThrow(char key)inthashCode()<V> VinjectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)MutableIntIteratorintIterator()MutableCharSetkeySet()LazyCharIterablekeysView()RichIterable<CharIntPair>keyValuesView()static CharIntHashMapnewWithKeysValues(char key1, int value1)static CharIntHashMapnewWithKeysValues(char key1, int value1, char key2, int value2)static CharIntHashMapnewWithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3)static CharIntHashMapnewWithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3, char key4, int value4)voidput(char key, int value)voidputAll(CharIntMap map)voidreadExternal(ObjectInput in)CharIntHashMapreject(CharIntPredicate predicate)voidremove(char key)voidremoveKey(char key)intremoveKeyIfAbsent(char key, int value)CharIntHashMapselect(CharIntPredicate predicate)ImmutableCharIntMaptoImmutable()StringtoString()booleantrimToSize()intupdateValue(char key, int initialValueIfAbsent, IntToIntFunction function)voidupdateValues(CharIntToIntFunction function)MutableIntCollectionvalues()CharIntHashMapwithKeysValues(char key1, int value1, char key2, int value2)CharIntHashMapwithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3)CharIntHashMapwithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3, char key4, int value4)CharIntHashMapwithKeyValue(char key1, int value1)CharIntHashMapwithoutAllKeys(CharIterable keys)CharIntHashMapwithoutKey(char key)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEachValue, isEmpty, max, min, notEmpty, reject, select, size, sum, toArray, toArray
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.CharIntMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.CharKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableCharIntMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
CharIntHashMap
public CharIntHashMap()
-
CharIntHashMap
public CharIntHashMap(int initialCapacity)
-
CharIntHashMap
public CharIntHashMap(CharIntMap map)
-
-
Method Detail
-
newWithKeysValues
public static CharIntHashMap newWithKeysValues(char key1, int value1)
-
newWithKeysValues
public static CharIntHashMap newWithKeysValues(char key1, int value1, char key2, int value2)
-
newWithKeysValues
public static CharIntHashMap newWithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3)
-
newWithKeysValues
public static CharIntHashMap newWithKeysValues(char key1, int value1, char key2, int value2, char key3, int value3, char key4, int value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfaceCharIntMap- Overrides:
equalsin classObject
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCharIntMap- Overrides:
hashCodein classObject
-
toString
public String toString()
- Specified by:
toStringin interfaceCharIntMap- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classAbstractIntIterable
-
intIterator
public MutableIntIterator intIterator()
- Specified by:
intIteratorin interfaceIntIterable- Specified by:
intIteratorin interfaceMutableIntValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectIntToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceIntIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableCharKeysMap- Specified by:
clearin interfaceMutableIntValuesMap
-
put
public void put(char key, int value)- Specified by:
putin interfaceMutableCharIntMap
-
putAll
public void putAll(CharIntMap map)
- Specified by:
putAllin interfaceMutableCharIntMap
-
updateValues
public void updateValues(CharIntToIntFunction function)
- Specified by:
updateValuesin interfaceMutableCharIntMap
-
removeKey
public void removeKey(char key)
- Specified by:
removeKeyin interfaceMutableCharIntMap- Specified by:
removeKeyin interfaceMutableCharKeysMap
-
remove
public void remove(char key)
- Specified by:
removein interfaceMutableCharIntMap
-
removeKeyIfAbsent
public int removeKeyIfAbsent(char key, int value)- Specified by:
removeKeyIfAbsentin interfaceMutableCharIntMap
-
getIfAbsentPut
public int getIfAbsentPut(char key, int value)- Specified by:
getIfAbsentPutin interfaceMutableCharIntMap
-
getAndPut
public int getAndPut(char key, int putValue, int defaultValue)- Specified by:
getAndPutin interfaceMutableCharIntMap
-
getIfAbsentPut
public int getIfAbsentPut(char key, IntFunction0 function)- Specified by:
getIfAbsentPutin interfaceMutableCharIntMap
-
getIfAbsentPutWith
public <P> int getIfAbsentPutWith(char key, IntFunction<? super P> function, P parameter)- Specified by:
getIfAbsentPutWithin interfaceMutableCharIntMap
-
getIfAbsentPutWithKey
public int getIfAbsentPutWithKey(char key, CharToIntFunction function)- Specified by:
getIfAbsentPutWithKeyin interfaceMutableCharIntMap
-
addToValue
public int addToValue(char key, int toBeAdded)- Specified by:
addToValuein interfaceMutableCharIntMap
-
updateValue
public int updateValue(char key, int initialValueIfAbsent, IntToIntFunction function)- Specified by:
updateValuein interfaceMutableCharIntMap
-
withKeyValue
public CharIntHashMap withKeyValue(char key1, int value1)
- Specified by:
withKeyValuein interfaceMutableCharIntMap
-
withKeysValues
public CharIntHashMap withKeysValues(char key1, int value1, char key2, int value2)
-
withKeysValues
public CharIntHashMap withKeysValues(char key1, int value1, char key2, int value2, char key3, int value3)
-
withKeysValues
public CharIntHashMap withKeysValues(char key1, int value1, char key2, int value2, char key3, int value3, char key4, int value4)
-
withoutKey
public CharIntHashMap withoutKey(char key)
- Specified by:
withoutKeyin interfaceMutableCharIntMap
-
withoutAllKeys
public CharIntHashMap withoutAllKeys(CharIterable keys)
- Specified by:
withoutAllKeysin interfaceMutableCharIntMap
-
asUnmodifiable
public MutableCharIntMap asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableCharIntMap
-
asSynchronized
public MutableCharIntMap asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableCharIntMap
-
toImmutable
public ImmutableCharIntMap toImmutable()
- Specified by:
toImmutablein interfaceCharIntMap
-
get
public int get(char key)
- Specified by:
getin interfaceCharIntMap
-
getIfAbsent
public int getIfAbsent(char key, int ifAbsent)- Specified by:
getIfAbsentin interfaceCharIntMap
-
getOrThrow
public int getOrThrow(char key)
- Specified by:
getOrThrowin interfaceCharIntMap
-
containsKey
public boolean containsKey(char key)
- Specified by:
containsKeyin interfaceCharIntMap- Specified by:
containsKeyin interfaceCharKeysMap
-
forEachKey
public void forEachKey(CharProcedure procedure)
- Specified by:
forEachKeyin interfaceCharIntMap- Specified by:
forEachKeyin interfaceCharKeysMap
-
forEachKeyValue
public void forEachKeyValue(CharIntProcedure procedure)
- Specified by:
forEachKeyValuein interfaceCharIntMap
-
keysView
public LazyCharIterable keysView()
- Specified by:
keysViewin interfaceCharIntMap
-
keyValuesView
public RichIterable<CharIntPair> keyValuesView()
- Specified by:
keyValuesViewin interfaceCharIntMap
-
flipUniqueValues
public MutableIntCharMap flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceCharIntMap- Specified by:
flipUniqueValuesin interfaceMutableCharIntMap
-
select
public CharIntHashMap select(CharIntPredicate predicate)
- Specified by:
selectin interfaceCharIntMap- Specified by:
selectin interfaceMutableCharIntMap
-
reject
public CharIntHashMap reject(CharIntPredicate predicate)
- Specified by:
rejectin interfaceCharIntMap- Specified by:
rejectin interfaceMutableCharIntMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
trimToSize
public boolean trimToSize()
- Since:
- 12.0
-
compact
@Deprecated public void compact()
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
keySet
public MutableCharSet keySet()
- Specified by:
keySetin interfaceCharIntMap
-
values
public MutableIntCollection values()
- Specified by:
valuesin interfaceIntValuesMap
-
-