Class ObjectCharHashMap<K>
- java.lang.Object
-
- org.eclipse.collections.impl.map.mutable.primitive.ObjectCharHashMap<K>
-
- All Implemented Interfaces:
Externalizable,Serializable,CharIterable,MutableObjectCharMap<K>,ObjectCharMap<K>,PrimitiveIterable
public class ObjectCharHashMap<K> extends Object implements MutableObjectCharMap<K>, Externalizable
This file was automatically generated from template file objectPrimitiveHashMap.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static charEMPTY_VALUE
-
Constructor Summary
Constructors Constructor Description ObjectCharHashMap()ObjectCharHashMap(int initialCapacity)ObjectCharHashMap(ObjectCharMap<? extends K> map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description charaddToValue(K key, char toBeAdded)booleanallSatisfy(CharPredicate predicate)booleananySatisfy(CharPredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyCharIterableasLazy()MutableObjectCharMap<K>asSynchronized()MutableObjectCharMap<K>asUnmodifiable()doubleaverage()MutableCharIteratorcharIterator()RichIterable<CharIterable>chunk(int size)voidclear()<V> MutableCollection<V>collect(CharToObjectFunction<? extends V> function)voidcompact()Deprecated.since 12.0 - UsetrimToSize()insteadbooleancontains(char value)booleancontainsAll(char... source)booleancontainsAll(CharIterable source)booleancontainsKey(Object key)booleancontainsValue(char value)intcount(CharPredicate predicate)chardetectIfNone(CharPredicate predicate, char ifNone)voideach(CharProcedure procedure)booleanequals(Object obj)MutableCharObjectMap<K>flipUniqueValues()voidforEachKey(Procedure<? super K> procedure)voidforEachKeyValue(ObjectCharProcedure<? super K> procedure)voidforEachValue(CharProcedure procedure)charget(Object key)chargetAndPut(K key, char putValue, char defaultValue)chargetIfAbsent(Object key, char ifAbsent)chargetIfAbsentPut(K key, char value)chargetIfAbsentPut(K key, CharFunction0 function)<P> chargetIfAbsentPutWith(K key, CharFunction<? super P> function, P parameter)chargetIfAbsentPutWithKey(K key, CharFunction<? super K> function)chargetOrThrow(Object key)inthashCode()<V> VinjectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)booleanisEmpty()Set<K>keySet()LazyIterable<K>keysView()RichIterable<ObjectCharPair<K>>keyValuesView()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)charmax()charmaxIfEmpty(char defaultValue)doublemedian()charmin()charminIfEmpty(char defaultValue)static <K> ObjectCharHashMap<K>newMap()static <K> ObjectCharHashMap<K>newWithKeysValues(K key1, char value1)static <K> ObjectCharHashMap<K>newWithKeysValues(K key1, char value1, K key2, char value2)static <K> ObjectCharHashMap<K>newWithKeysValues(K key1, char value1, K key2, char value2, K key3, char value3)static <K> ObjectCharHashMap<K>newWithKeysValues(K key1, char value1, K key2, char value2, K key3, char value3, K key4, char value4)booleannoneSatisfy(CharPredicate predicate)booleannotEmpty()voidput(K key, char value)voidputAll(ObjectCharMap<? extends K> map)voidreadExternal(ObjectInput in)MutableCharCollectionreject(CharPredicate predicate)ObjectCharHashMap<K>reject(ObjectCharPredicate<? super K> predicate)voidremove(Object key)voidremoveKey(K key)charremoveKeyIfAbsent(K key, char value)MutableCharCollectionselect(CharPredicate predicate)ObjectCharHashMap<K>select(ObjectCharPredicate<? super K> predicate)intsize()longsum()char[]toArray()char[]toArray(char[] target)MutableCharBagtoBag()ImmutableObjectCharMap<K>toImmutable()MutableCharListtoList()MutableCharSettoSet()char[]toSortedArray()MutableCharListtoSortedList()StringtoString()booleantrimToSize()charupdateValue(K key, char initialValueIfAbsent, CharToCharFunction function)voidupdateValues(ObjectCharToCharFunction<? super K> function)MutableCharCollectionvalues()ObjectCharHashMap<K>withKeysValues(K key1, char value1, K key2, char value2)ObjectCharHashMap<K>withKeysValues(K key1, char value1, K key2, char value2, K key3, char value3)ObjectCharHashMap<K>withKeysValues(K key1, char value1, K key2, char value2, K key3, char value3, K key4, char value4)ObjectCharHashMap<K>withKeyValue(K key1, char value1)ObjectCharHashMap<K>withoutAllKeys(Iterable<? extends K> keys)ObjectCharHashMap<K>withoutKey(K key)voidwriteExternal(ObjectOutput out)-
Methods inherited from interface org.eclipse.collections.api.CharIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableObjectCharMap
putPair, tap, withAllKeyValues
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectCharMap
injectIntoKeyValue
-
-
-
-
Field Detail
-
EMPTY_VALUE
public static final char EMPTY_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectCharHashMap
public ObjectCharHashMap()
-
ObjectCharHashMap
public ObjectCharHashMap(int initialCapacity)
-
ObjectCharHashMap
public ObjectCharHashMap(ObjectCharMap<? extends K> map)
-
-
Method Detail
-
newMap
public static <K> ObjectCharHashMap<K> newMap()
-
newWithKeysValues
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1)
-
newWithKeysValues
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1, K key2, char value2)
-
newWithKeysValues
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1, K key2, char value2, K key3, char value3)
-
newWithKeysValues
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1, K key2, char value2, K key3, char value3, K key4, char value4)
-
toString
public String toString()
- Specified by:
toStringin interfaceObjectCharMap<K>- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
charIterator
public MutableCharIterator charIterator()
- Specified by:
charIteratorin interfaceCharIterable- Specified by:
charIteratorin interfaceMutableObjectCharMap<K>
-
toArray
public char[] toArray()
- Specified by:
toArrayin interfaceCharIterable
-
toArray
public char[] toArray(char[] target)
- Specified by:
toArrayin interfaceCharIterable
-
contains
public boolean contains(char value)
- Specified by:
containsin interfaceCharIterable
-
containsAll
public boolean containsAll(char... source)
- Specified by:
containsAllin interfaceCharIterable
-
containsAll
public boolean containsAll(CharIterable source)
- Specified by:
containsAllin interfaceCharIterable
-
clear
public void clear()
- Specified by:
clearin interfaceMutableObjectCharMap<K>
-
put
public void put(K key, char value)
- Specified by:
putin interfaceMutableObjectCharMap<K>
-
putAll
public void putAll(ObjectCharMap<? extends K> map)
- Specified by:
putAllin interfaceMutableObjectCharMap<K>
-
updateValues
public void updateValues(ObjectCharToCharFunction<? super K> function)
- Specified by:
updateValuesin interfaceMutableObjectCharMap<K>
-
removeKey
public void removeKey(K key)
- Specified by:
removeKeyin interfaceMutableObjectCharMap<K>
-
remove
public void remove(Object key)
- Specified by:
removein interfaceMutableObjectCharMap<K>
-
removeKeyIfAbsent
public char removeKeyIfAbsent(K key, char value)
- Specified by:
removeKeyIfAbsentin interfaceMutableObjectCharMap<K>
-
getIfAbsentPut
public char getIfAbsentPut(K key, char value)
- Specified by:
getIfAbsentPutin interfaceMutableObjectCharMap<K>
-
getAndPut
public char getAndPut(K key, char putValue, char defaultValue)
- Specified by:
getAndPutin interfaceMutableObjectCharMap<K>
-
getIfAbsentPut
public char getIfAbsentPut(K key, CharFunction0 function)
- Specified by:
getIfAbsentPutin interfaceMutableObjectCharMap<K>
-
getIfAbsentPutWith
public <P> char getIfAbsentPutWith(K key, CharFunction<? super P> function, P parameter)
- Specified by:
getIfAbsentPutWithin interfaceMutableObjectCharMap<K>
-
getIfAbsentPutWithKey
public char getIfAbsentPutWithKey(K key, CharFunction<? super K> function)
- Specified by:
getIfAbsentPutWithKeyin interfaceMutableObjectCharMap<K>
-
updateValue
public char updateValue(K key, char initialValueIfAbsent, CharToCharFunction function)
- Specified by:
updateValuein interfaceMutableObjectCharMap<K>
-
addToValue
public char addToValue(K key, char toBeAdded)
- Specified by:
addToValuein interfaceMutableObjectCharMap<K>
-
withKeyValue
public ObjectCharHashMap<K> withKeyValue(K key1, char value1)
- Specified by:
withKeyValuein interfaceMutableObjectCharMap<K>
-
withKeysValues
public ObjectCharHashMap<K> withKeysValues(K key1, char value1, K key2, char value2)
-
withKeysValues
public ObjectCharHashMap<K> withKeysValues(K key1, char value1, K key2, char value2, K key3, char value3)
-
withKeysValues
public ObjectCharHashMap<K> withKeysValues(K key1, char value1, K key2, char value2, K key3, char value3, K key4, char value4)
-
withoutKey
public ObjectCharHashMap<K> withoutKey(K key)
- Specified by:
withoutKeyin interfaceMutableObjectCharMap<K>
-
withoutAllKeys
public ObjectCharHashMap<K> withoutAllKeys(Iterable<? extends K> keys)
- Specified by:
withoutAllKeysin interfaceMutableObjectCharMap<K>
-
asUnmodifiable
public MutableObjectCharMap<K> asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableObjectCharMap<K>
-
asSynchronized
public MutableObjectCharMap<K> asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableObjectCharMap<K>
-
toImmutable
public ImmutableObjectCharMap<K> toImmutable()
- Specified by:
toImmutablein interfaceObjectCharMap<K>
-
get
public char get(Object key)
- Specified by:
getin interfaceObjectCharMap<K>
-
getOrThrow
public char getOrThrow(Object key)
- Specified by:
getOrThrowin interfaceObjectCharMap<K>
-
getIfAbsent
public char getIfAbsent(Object key, char ifAbsent)
- Specified by:
getIfAbsentin interfaceObjectCharMap<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceObjectCharMap<K>
-
containsValue
public boolean containsValue(char value)
- Specified by:
containsValuein interfaceObjectCharMap<K>
-
each
public void each(CharProcedure procedure)
- Specified by:
eachin interfaceCharIterable- Since:
- 7.0.
-
forEachValue
public void forEachValue(CharProcedure procedure)
- Specified by:
forEachValuein interfaceObjectCharMap<K>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceObjectCharMap<K>
-
forEachKeyValue
public void forEachKeyValue(ObjectCharProcedure<? super K> procedure)
- Specified by:
forEachKeyValuein interfaceObjectCharMap<K>
-
select
public ObjectCharHashMap<K> select(ObjectCharPredicate<? super K> predicate)
- Specified by:
selectin interfaceMutableObjectCharMap<K>- Specified by:
selectin interfaceObjectCharMap<K>
-
reject
public ObjectCharHashMap<K> reject(ObjectCharPredicate<? super K> predicate)
- Specified by:
rejectin interfaceMutableObjectCharMap<K>- Specified by:
rejectin interfaceObjectCharMap<K>
-
select
public MutableCharCollection select(CharPredicate predicate)
- Specified by:
selectin interfaceCharIterable- Specified by:
selectin interfaceMutableObjectCharMap<K>
-
reject
public MutableCharCollection reject(CharPredicate predicate)
- Specified by:
rejectin interfaceCharIterable- Specified by:
rejectin interfaceMutableObjectCharMap<K>
-
detectIfNone
public char detectIfNone(CharPredicate predicate, char ifNone)
- Specified by:
detectIfNonein interfaceCharIterable
-
collect
public <V> MutableCollection<V> collect(CharToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceCharIterable- Specified by:
collectin interfaceMutableObjectCharMap<K>
-
count
public int count(CharPredicate predicate)
- Specified by:
countin interfaceCharIterable
-
anySatisfy
public boolean anySatisfy(CharPredicate predicate)
- Specified by:
anySatisfyin interfaceCharIterable
-
allSatisfy
public boolean allSatisfy(CharPredicate predicate)
- Specified by:
allSatisfyin interfaceCharIterable
-
noneSatisfy
public boolean noneSatisfy(CharPredicate predicate)
- Specified by:
noneSatisfyin interfaceCharIterable
-
injectInto
public <V> V injectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)- Specified by:
injectIntoin interfaceCharIterable
-
chunk
public RichIterable<CharIterable> chunk(int size)
- Specified by:
chunkin interfaceCharIterable
-
sum
public long sum()
- Specified by:
sumin interfaceCharIterable
-
max
public char max()
- Specified by:
maxin interfaceCharIterable
-
min
public char min()
- Specified by:
minin interfaceCharIterable
-
maxIfEmpty
public char maxIfEmpty(char defaultValue)
- Specified by:
maxIfEmptyin interfaceCharIterable
-
minIfEmpty
public char minIfEmpty(char defaultValue)
- Specified by:
minIfEmptyin interfaceCharIterable
-
average
public double average()
- Specified by:
averagein interfaceCharIterable
-
median
public double median()
- Specified by:
medianin interfaceCharIterable
-
toList
public MutableCharList toList()
- Specified by:
toListin interfaceCharIterable
-
toSet
public MutableCharSet toSet()
- Specified by:
toSetin interfaceCharIterable
-
toBag
public MutableCharBag toBag()
- Specified by:
toBagin interfaceCharIterable
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazyin interfaceCharIterable
-
toSortedArray
public char[] toSortedArray()
- Specified by:
toSortedArrayin interfaceCharIterable
-
toSortedList
public MutableCharList toSortedList()
- Specified by:
toSortedListin interfaceCharIterable
-
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
-
keysView
public LazyIterable<K> keysView()
- Specified by:
keysViewin interfaceObjectCharMap<K>
-
keyValuesView
public RichIterable<ObjectCharPair<K>> keyValuesView()
- Specified by:
keyValuesViewin interfaceObjectCharMap<K>
-
flipUniqueValues
public MutableCharObjectMap<K> flipUniqueValues()
- Specified by:
flipUniqueValuesin interfaceMutableObjectCharMap<K>- Specified by:
flipUniqueValuesin interfaceObjectCharMap<K>
-
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 Set<K> keySet()
- Specified by:
keySetin interfaceObjectCharMap<K>
-
values
public MutableCharCollection values()
- Specified by:
valuesin interfaceObjectCharMap<K>
-
-