Class IntCharHashMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractCharIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableCharValuesMap
-
- org.eclipse.collections.impl.map.mutable.primitive.IntCharHashMap
-
- All Implemented Interfaces:
Externalizable
,Serializable
,CharIterable
,CharValuesMap
,IntCharMap
,MutableCharValuesMap
,MutableIntCharMap
,PrimitiveIterable
,MutableIntKeysMap
,IntKeysMap
public class IntCharHashMap extends AbstractMutableCharValuesMap implements MutableIntCharMap, Externalizable, MutableIntKeysMap
This file was automatically generated from template file primitivePrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntCharHashMap()
IntCharHashMap(int initialCapacity)
IntCharHashMap(IntCharMap map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description char
addToValue(int key, char toBeAdded)
MutableIntCharMap
asSynchronized()
MutableIntCharMap
asUnmodifiable()
MutableCharIterator
charIterator()
void
clear()
void
compact()
Deprecated.since 12.0 - UsetrimToSize()
insteadboolean
containsKey(int key)
boolean
equals(Object obj)
MutableCharIntMap
flipUniqueValues()
void
forEachKey(IntProcedure procedure)
void
forEachKeyValue(IntCharProcedure procedure)
char
get(int key)
char
getAndPut(int key, char putValue, char defaultValue)
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()
<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(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()
String
toString()
boolean
trimToSize()
char
updateValue(int key, char initialValueIfAbsent, CharToCharFunction function)
void
updateValues(IntCharToCharFunction function)
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(ObjectOutput out)
-
Methods inherited from class org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableCharValuesMap
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.AbstractCharIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
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.CharValuesMap
containsValue, forEachValue, tap
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.IntCharMap
injectIntoKeyValue
-
Methods inherited from interface org.eclipse.collections.impl.map.primitive.IntKeysMap
isEmpty, notEmpty, size
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableCharValuesMap
collect, reject, select
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntCharMap
putPair, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
-
-
-
Constructor Detail
-
IntCharHashMap
public IntCharHashMap()
-
IntCharHashMap
public IntCharHashMap(int initialCapacity)
-
IntCharHashMap
public IntCharHashMap(IntCharMap map)
-
-
Method Detail
-
newWithKeysValues
public static IntCharHashMap newWithKeysValues(int key1, char value1)
-
newWithKeysValues
public static IntCharHashMap newWithKeysValues(int key1, char value1, int key2, char value2)
-
newWithKeysValues
public static IntCharHashMap newWithKeysValues(int key1, char value1, int key2, char value2, int key3, char value3)
-
newWithKeysValues
public static IntCharHashMap newWithKeysValues(int key1, char value1, int key2, char value2, int key3, char value3, int key4, char value4)
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfaceIntCharMap
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceIntCharMap
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Specified by:
toString
in interfaceIntCharMap
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractCharIterable
-
charIterator
public MutableCharIterator charIterator()
- Specified by:
charIterator
in interfaceCharIterable
- Specified by:
charIterator
in interfaceMutableCharValuesMap
-
injectInto
public <V> V injectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)
- Specified by:
injectInto
in interfaceCharIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableCharValuesMap
- Specified by:
clear
in interfaceMutableIntKeysMap
-
put
public void put(int key, char value)
- Specified by:
put
in interfaceMutableIntCharMap
-
putAll
public void putAll(IntCharMap map)
- Specified by:
putAll
in interfaceMutableIntCharMap
-
updateValues
public void updateValues(IntCharToCharFunction function)
- Specified by:
updateValues
in interfaceMutableIntCharMap
-
removeKey
public void removeKey(int key)
- Specified by:
removeKey
in interfaceMutableIntCharMap
- Specified by:
removeKey
in interfaceMutableIntKeysMap
-
remove
public void remove(int key)
- Specified by:
remove
in interfaceMutableIntCharMap
-
removeKeyIfAbsent
public char removeKeyIfAbsent(int key, char value)
- Specified by:
removeKeyIfAbsent
in interfaceMutableIntCharMap
-
getIfAbsentPut
public char getIfAbsentPut(int key, char value)
- Specified by:
getIfAbsentPut
in interfaceMutableIntCharMap
-
getAndPut
public char getAndPut(int key, char putValue, char defaultValue)
- Specified by:
getAndPut
in interfaceMutableIntCharMap
-
getIfAbsentPut
public char getIfAbsentPut(int key, CharFunction0 function)
- Specified by:
getIfAbsentPut
in interfaceMutableIntCharMap
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(int key, CharFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWith
in interfaceMutableIntCharMap
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(int key, IntToCharFunction function)
- Specified by:
getIfAbsentPutWithKey
in interfaceMutableIntCharMap
-
addToValue
public char addToValue(int key, char toBeAdded)
- Specified by:
addToValue
in interfaceMutableIntCharMap
-
updateValue
public char updateValue(int key, char initialValueIfAbsent, CharToCharFunction function)
- Specified by:
updateValue
in interfaceMutableIntCharMap
-
withKeyValue
public IntCharHashMap withKeyValue(int key1, char value1)
- Specified by:
withKeyValue
in interfaceMutableIntCharMap
-
withKeysValues
public IntCharHashMap withKeysValues(int key1, char value1, int key2, char value2)
-
withKeysValues
public IntCharHashMap withKeysValues(int key1, char value1, int key2, char value2, int key3, char value3)
-
withKeysValues
public IntCharHashMap withKeysValues(int key1, char value1, int key2, char value2, int key3, char value3, int key4, char value4)
-
withoutKey
public IntCharHashMap withoutKey(int key)
- Specified by:
withoutKey
in interfaceMutableIntCharMap
-
withoutAllKeys
public IntCharHashMap withoutAllKeys(IntIterable keys)
- Specified by:
withoutAllKeys
in interfaceMutableIntCharMap
-
asUnmodifiable
public MutableIntCharMap asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntCharMap
-
asSynchronized
public MutableIntCharMap asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntCharMap
-
toImmutable
public ImmutableIntCharMap toImmutable()
- Specified by:
toImmutable
in interfaceIntCharMap
-
get
public char get(int key)
- Specified by:
get
in interfaceIntCharMap
-
getIfAbsent
public char getIfAbsent(int key, char ifAbsent)
- Specified by:
getIfAbsent
in interfaceIntCharMap
-
getOrThrow
public char getOrThrow(int key)
- Specified by:
getOrThrow
in interfaceIntCharMap
-
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interfaceIntCharMap
- Specified by:
containsKey
in interfaceIntKeysMap
-
forEachKey
public void forEachKey(IntProcedure procedure)
- Specified by:
forEachKey
in interfaceIntCharMap
- Specified by:
forEachKey
in interfaceIntKeysMap
-
forEachKeyValue
public void forEachKeyValue(IntCharProcedure procedure)
- Specified by:
forEachKeyValue
in interfaceIntCharMap
-
keysView
public LazyIntIterable keysView()
- Specified by:
keysView
in interfaceIntCharMap
-
keyValuesView
public RichIterable<IntCharPair> keyValuesView()
- Specified by:
keyValuesView
in interfaceIntCharMap
-
flipUniqueValues
public MutableCharIntMap flipUniqueValues()
- Specified by:
flipUniqueValues
in interfaceIntCharMap
- Specified by:
flipUniqueValues
in interfaceMutableIntCharMap
-
select
public IntCharHashMap select(IntCharPredicate predicate)
- Specified by:
select
in interfaceIntCharMap
- Specified by:
select
in interfaceMutableIntCharMap
-
reject
public IntCharHashMap reject(IntCharPredicate predicate)
- Specified by:
reject
in interfaceIntCharMap
- Specified by:
reject
in interfaceMutableIntCharMap
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
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 MutableIntSet keySet()
- Specified by:
keySet
in interfaceIntCharMap
-
values
public MutableCharCollection values()
- Specified by:
values
in interfaceCharValuesMap
-
-