public class ObjectCharHashMap<K>
extends java.lang.Object
implements com.gs.collections.api.map.primitive.MutableObjectCharMap<K>, java.io.Externalizable
| Modifier and Type | Field and Description |
|---|---|
static char |
EMPTY_VALUE |
| Constructor and Description |
|---|
ObjectCharHashMap() |
ObjectCharHashMap(int initialCapacity) |
ObjectCharHashMap(com.gs.collections.api.map.primitive.ObjectCharMap<? extends K> map) |
| Modifier and Type | Method and Description |
|---|---|
char |
addToValue(K key,
char toBeAdded) |
boolean |
allSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
boolean |
anySatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
void |
appendString(java.lang.Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(java.lang.Appendable appendable,
java.lang.String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
Prints a string representation of this collection onto the given
Appendable. |
com.gs.collections.api.LazyCharIterable |
asLazy() |
com.gs.collections.api.map.primitive.MutableObjectCharMap<K> |
asSynchronized() |
com.gs.collections.api.map.primitive.MutableObjectCharMap<K> |
asUnmodifiable() |
double |
average() |
com.gs.collections.api.iterator.CharIterator |
charIterator() |
void |
clear() |
<V> com.gs.collections.api.collection.MutableCollection<V> |
collect(com.gs.collections.api.block.function.primitive.CharToObjectFunction<? extends V> function) |
void |
compact()
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
contains(char value) |
boolean |
containsAll(char... source) |
boolean |
containsAll(com.gs.collections.api.CharIterable source) |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(char value) |
int |
count(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
char |
detectIfNone(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate,
char ifNone) |
boolean |
equals(java.lang.Object obj) |
void |
forEach(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure) |
void |
forEachKey(com.gs.collections.api.block.procedure.Procedure<? super K> procedure) |
void |
forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ObjectCharProcedure<? super K> procedure) |
void |
forEachValue(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure) |
char |
get(java.lang.Object key) |
char |
getIfAbsent(java.lang.Object key,
char ifAbsent) |
char |
getIfAbsentPut(K key,
char value) |
char |
getIfAbsentPut(K key,
com.gs.collections.api.block.function.primitive.CharFunction0 function) |
<P> char |
getIfAbsentPutWith(K key,
com.gs.collections.api.block.function.primitive.CharFunction<? super P> function,
P parameter) |
char |
getIfAbsentPutWithKey(K key,
com.gs.collections.api.block.function.primitive.CharFunction<? super K> function) |
char |
getOrThrow(java.lang.Object key) |
int |
hashCode() |
<V> V |
injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectCharToObjectFunction<? super V,? extends V> function) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
java.util.Set<K> |
keySet() |
com.gs.collections.api.LazyIterable<K> |
keysView() |
com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.ObjectCharPair<K>> |
keyValuesView() |
java.lang.String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
java.lang.String |
makeString(java.lang.String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
java.lang.String |
makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
Returns a string representation of this collection.
|
char |
max() |
char |
maxIfEmpty(char defaultValue) |
double |
median() |
char |
min() |
char |
minIfEmpty(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) |
boolean |
noneSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
put(K key,
char value) |
void |
putAll(com.gs.collections.api.map.primitive.ObjectCharMap<? extends K> map) |
void |
readExternal(java.io.ObjectInput in) |
com.gs.collections.api.collection.primitive.MutableCharCollection |
reject(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
ObjectCharHashMap<K> |
reject(com.gs.collections.api.block.predicate.primitive.ObjectCharPredicate<? super K> predicate) |
void |
remove(java.lang.Object key) |
void |
removeKey(K key) |
char |
removeKeyIfAbsent(K key,
char value) |
com.gs.collections.api.collection.primitive.MutableCharCollection |
select(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
ObjectCharHashMap<K> |
select(com.gs.collections.api.block.predicate.primitive.ObjectCharPredicate<? super K> predicate) |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
char[] |
toArray() |
com.gs.collections.api.bag.primitive.MutableCharBag |
toBag() |
com.gs.collections.api.map.primitive.ImmutableObjectCharMap<K> |
toImmutable() |
com.gs.collections.api.list.primitive.MutableCharList |
toList() |
com.gs.collections.api.set.primitive.MutableCharSet |
toSet() |
char[] |
toSortedArray() |
com.gs.collections.api.list.primitive.MutableCharList |
toSortedList() |
java.lang.String |
toString()
Returns a string representation of this ObjectCharMap.
|
char |
updateValue(K key,
char initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.CharToCharFunction function) |
com.gs.collections.api.collection.primitive.MutableCharCollection |
values() |
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(java.lang.Iterable<? extends K> keys) |
ObjectCharHashMap<K> |
withoutKey(K key) |
void |
writeExternal(java.io.ObjectOutput out) |
public static final char EMPTY_VALUE
public ObjectCharHashMap()
public ObjectCharHashMap(int initialCapacity)
public ObjectCharHashMap(com.gs.collections.api.map.primitive.ObjectCharMap<? extends K> map)
public static <K> ObjectCharHashMap<K> newMap()
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1)
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1, K key2, char value2)
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1, K key2, char value2, K key3, char value3)
public static <K> ObjectCharHashMap<K> newWithKeysValues(K key1, char value1, K key2, char value2, K key3, char value3, K key4, char value4)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.map.primitive.ObjectCharMaptoString in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>toString in interface com.gs.collections.api.PrimitiveIterabletoString in class java.lang.Objectpublic int size()
com.gs.collections.api.PrimitiveIterablesize in interface com.gs.collections.api.PrimitiveIterablepublic boolean isEmpty()
com.gs.collections.api.PrimitiveIterableisEmpty in interface com.gs.collections.api.PrimitiveIterablepublic boolean notEmpty()
com.gs.collections.api.PrimitiveIterablenotEmpty in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString()
com.gs.collections.api.PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString(java.lang.String separator)
com.gs.collections.api.PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface com.gs.collections.api.PrimitiveIterablepublic java.lang.String makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterablemakeString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String separator)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
com.gs.collections.api.PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface com.gs.collections.api.PrimitiveIterablepublic com.gs.collections.api.iterator.CharIterator charIterator()
charIterator in interface com.gs.collections.api.CharIterablepublic char[] toArray()
toArray in interface com.gs.collections.api.CharIterablepublic boolean contains(char value)
contains in interface com.gs.collections.api.CharIterablepublic boolean containsAll(char... source)
containsAll in interface com.gs.collections.api.CharIterablepublic boolean containsAll(com.gs.collections.api.CharIterable source)
containsAll in interface com.gs.collections.api.CharIterablepublic void clear()
clear in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public void put(K key, char value)
put in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public void putAll(com.gs.collections.api.map.primitive.ObjectCharMap<? extends K> map)
putAll in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public void removeKey(K key)
removeKey in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public void remove(java.lang.Object key)
remove in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char removeKeyIfAbsent(K key, char value)
removeKeyIfAbsent in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char getIfAbsentPut(K key, char value)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char getIfAbsentPut(K key, com.gs.collections.api.block.function.primitive.CharFunction0 function)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public <P> char getIfAbsentPutWith(K key, com.gs.collections.api.block.function.primitive.CharFunction<? super P> function, P parameter)
getIfAbsentPutWith in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char getIfAbsentPutWithKey(K key, com.gs.collections.api.block.function.primitive.CharFunction<? super K> function)
getIfAbsentPutWithKey in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char updateValue(K key, char initialValueIfAbsent, com.gs.collections.api.block.function.primitive.CharToCharFunction function)
updateValue in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char addToValue(K key, char toBeAdded)
addToValue in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public ObjectCharHashMap<K> withKeyValue(K key1, char value1)
withKeyValue in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public ObjectCharHashMap<K> withKeysValues(K key1, char value1, K key2, char value2)
public ObjectCharHashMap<K> withKeysValues(K key1, char value1, K key2, char value2, K key3, char value3)
public ObjectCharHashMap<K> withKeysValues(K key1, char value1, K key2, char value2, K key3, char value3, K key4, char value4)
public ObjectCharHashMap<K> withoutKey(K key)
withoutKey in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public ObjectCharHashMap<K> withoutAllKeys(java.lang.Iterable<? extends K> keys)
withoutAllKeys in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public com.gs.collections.api.map.primitive.MutableObjectCharMap<K> asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public com.gs.collections.api.map.primitive.MutableObjectCharMap<K> asSynchronized()
asSynchronized in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public com.gs.collections.api.map.primitive.ImmutableObjectCharMap<K> toImmutable()
toImmutable in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public char get(java.lang.Object key)
get in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public char getOrThrow(java.lang.Object key)
getOrThrow in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public char getIfAbsent(java.lang.Object key,
char ifAbsent)
getIfAbsent in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public boolean containsKey(java.lang.Object key)
containsKey in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public boolean containsValue(char value)
containsValue in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public void forEach(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure)
forEach in interface com.gs.collections.api.CharIterablepublic void forEachValue(com.gs.collections.api.block.procedure.primitive.CharProcedure procedure)
forEachValue in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public void forEachKey(com.gs.collections.api.block.procedure.Procedure<? super K> procedure)
forEachKey in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public void forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ObjectCharProcedure<? super K> procedure)
forEachKeyValue in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public ObjectCharHashMap<K> select(com.gs.collections.api.block.predicate.primitive.ObjectCharPredicate<? super K> predicate)
public ObjectCharHashMap<K> reject(com.gs.collections.api.block.predicate.primitive.ObjectCharPredicate<? super K> predicate)
public com.gs.collections.api.collection.primitive.MutableCharCollection select(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
select in interface com.gs.collections.api.CharIterableselect in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public com.gs.collections.api.collection.primitive.MutableCharCollection reject(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
reject in interface com.gs.collections.api.CharIterablereject in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public char detectIfNone(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate,
char ifNone)
detectIfNone in interface com.gs.collections.api.CharIterablepublic <V> com.gs.collections.api.collection.MutableCollection<V> collect(com.gs.collections.api.block.function.primitive.CharToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.CharIterablecollect in interface com.gs.collections.api.map.primitive.MutableObjectCharMap<K>public int count(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
count in interface com.gs.collections.api.CharIterablepublic boolean anySatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
anySatisfy in interface com.gs.collections.api.CharIterablepublic boolean allSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
allSatisfy in interface com.gs.collections.api.CharIterablepublic boolean noneSatisfy(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
noneSatisfy in interface com.gs.collections.api.CharIterablepublic <V> V injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectCharToObjectFunction<? super V,? extends V> function)
injectInto in interface com.gs.collections.api.CharIterablepublic long sum()
sum in interface com.gs.collections.api.CharIterablepublic char max()
max in interface com.gs.collections.api.CharIterablepublic char min()
min in interface com.gs.collections.api.CharIterablepublic char maxIfEmpty(char defaultValue)
maxIfEmpty in interface com.gs.collections.api.CharIterablepublic char minIfEmpty(char defaultValue)
minIfEmpty in interface com.gs.collections.api.CharIterablepublic double average()
average in interface com.gs.collections.api.CharIterablepublic double median()
median in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.list.primitive.MutableCharList toList()
toList in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.set.primitive.MutableCharSet toSet()
toSet in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.bag.primitive.MutableCharBag toBag()
toBag in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.LazyCharIterable asLazy()
asLazy in interface com.gs.collections.api.CharIterablepublic char[] toSortedArray()
toSortedArray in interface com.gs.collections.api.CharIterablepublic com.gs.collections.api.list.primitive.MutableCharList toSortedList()
toSortedList in interface com.gs.collections.api.CharIterablepublic 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 com.gs.collections.api.LazyIterable<K> keysView()
keysView in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.ObjectCharPair<K>> keyValuesView()
keyValuesView in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public void compact()
public java.util.Set<K> keySet()
keySet in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>public com.gs.collections.api.collection.primitive.MutableCharCollection values()
values in interface com.gs.collections.api.map.primitive.ObjectCharMap<K>