Externalizable, Serializable, DoubleIterable, CharDoubleMap, DoubleValuesMap, MutableCharDoubleMap, MutableDoubleValuesMap, PrimitiveIterable, MutableCharKeysMap, CharKeysMappublic class CharDoubleHashMap extends AbstractMutableDoubleValuesMap implements MutableCharDoubleMap, Externalizable, MutableCharKeysMap
| Constructor | Description |
|---|---|
CharDoubleHashMap() |
|
CharDoubleHashMap(int initialCapacity) |
|
CharDoubleHashMap(CharDoubleMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
double |
addToValue(char key,
double toBeAdded) |
|
MutableCharDoubleMap |
asSynchronized() |
|
MutableCharDoubleMap |
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) |
|
MutableDoubleIterator |
doubleIterator() |
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an
imperative style.
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableDoubleCharMap |
flipUniqueValues() |
Return the DoubleCharMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(CharProcedure procedure) |
|
void |
forEachKeyValue(CharDoubleProcedure procedure) |
|
double |
get(char key) |
|
double |
getIfAbsent(char key,
double ifAbsent) |
|
double |
getIfAbsentPut(char key,
double value) |
|
double |
getIfAbsentPut(char key,
DoubleFunction0 function) |
|
<P> double |
getIfAbsentPutWith(char key,
DoubleFunction<? super P> function,
P parameter) |
|
double |
getIfAbsentPutWithKey(char key,
CharToDoubleFunction function) |
|
double |
getOrThrow(char key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectDoubleToObjectFunction<? super V,? extends V> function) |
|
MutableCharSet |
keySet() |
|
LazyCharIterable |
keysView() |
|
RichIterable<CharDoublePair> |
keyValuesView() |
|
static CharDoubleHashMap |
newWithKeysValues(char key1,
double value1) |
|
static CharDoubleHashMap |
newWithKeysValues(char key1,
double value1,
char key2,
double value2) |
|
static CharDoubleHashMap |
newWithKeysValues(char key1,
double value1,
char key2,
double value2,
char key3,
double value3) |
|
static CharDoubleHashMap |
newWithKeysValues(char key1,
double value1,
char key2,
double value2,
char key3,
double value3,
char key4,
double value4) |
|
void |
put(char key,
double value) |
|
void |
putAll(CharDoubleMap map) |
|
void |
readExternal(ObjectInput in) |
|
CharDoubleHashMap |
reject(CharDoublePredicate predicate) |
|
void |
remove(char key) |
|
void |
removeKey(char key) |
|
double |
removeKeyIfAbsent(char key,
double value) |
|
CharDoubleHashMap |
select(CharDoublePredicate predicate) |
|
ImmutableCharDoubleMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
double |
updateValue(char key,
double initialValueIfAbsent,
DoubleToDoubleFunction function) |
|
void |
updateValues(CharDoubleToDoubleFunction function) |
Updates the values in-place.
|
MutableDoubleCollection |
values() |
|
CharDoubleHashMap |
withKeysValues(char key1,
double value1,
char key2,
double value2) |
|
CharDoubleHashMap |
withKeysValues(char key1,
double value1,
char key2,
double value2,
char key3,
double value3) |
|
CharDoubleHashMap |
withKeysValues(char key1,
double value1,
char key2,
double value2,
char key3,
double value3,
char key4,
double value4) |
|
CharDoubleHashMap |
withKeyValue(char key1,
double value1) |
|
CharDoubleHashMap |
withoutAllKeys(CharIterable keys) |
|
CharDoubleHashMap |
withoutKey(char key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayisEmpty, notEmpty, sizeallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListcontainsValue, forEachValue, tapputPair, withAllKeyValuescollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic CharDoubleHashMap()
public CharDoubleHashMap(int initialCapacity)
public CharDoubleHashMap(CharDoubleMap map)
public static CharDoubleHashMap newWithKeysValues(char key1, double value1)
public static CharDoubleHashMap newWithKeysValues(char key1, double value1, char key2, double value2)
public static CharDoubleHashMap newWithKeysValues(char key1, double value1, char key2, double value2, char key3, double value3)
public static CharDoubleHashMap newWithKeysValues(char key1, double value1, char key2, double value2, char key3, double value3, char key4, double value4)
public boolean equals(Object obj)
CharDoubleMapMap.equals(Object).equals in interface CharDoubleMapequals in class Objectpublic int hashCode()
CharDoubleMapMap.hashCode().hashCode in interface CharDoubleMaphashCode in class Objectpublic String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString in interface CharDoubleMaptoString in interface PrimitiveIterabletoString in class AbstractDoubleIterableAbstractCollection.toString()public MutableDoubleIterator doubleIterator()
DoubleIterabledoubleIterator in interface DoubleIterabledoubleIterator in interface MutableDoubleValuesMappublic <V> V injectInto(V injectedValue,
ObjectDoubleToObjectFunction<? super V,? extends V> function)
injectInto in interface DoubleIterablepublic void clear()
clear in interface MutableCharKeysMapclear in interface MutableDoubleValuesMappublic void put(char key,
double value)
put in interface MutableCharDoubleMappublic void putAll(CharDoubleMap map)
putAll in interface MutableCharDoubleMappublic void updateValues(CharDoubleToDoubleFunction function)
MutableCharDoubleMapupdateValues in interface MutableCharDoubleMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(char key)
removeKey in interface MutableCharDoubleMapremoveKey in interface MutableCharKeysMappublic void remove(char key)
remove in interface MutableCharDoubleMappublic double removeKeyIfAbsent(char key,
double value)
removeKeyIfAbsent in interface MutableCharDoubleMappublic double getIfAbsentPut(char key,
double value)
getIfAbsentPut in interface MutableCharDoubleMappublic double getIfAbsentPut(char key,
DoubleFunction0 function)
getIfAbsentPut in interface MutableCharDoubleMappublic <P> double getIfAbsentPutWith(char key,
DoubleFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableCharDoubleMappublic double getIfAbsentPutWithKey(char key,
CharToDoubleFunction function)
getIfAbsentPutWithKey in interface MutableCharDoubleMappublic double addToValue(char key,
double toBeAdded)
addToValue in interface MutableCharDoubleMappublic double updateValue(char key,
double initialValueIfAbsent,
DoubleToDoubleFunction function)
updateValue in interface MutableCharDoubleMappublic CharDoubleHashMap withKeyValue(char key1, double value1)
withKeyValue in interface MutableCharDoubleMappublic CharDoubleHashMap withKeysValues(char key1, double value1, char key2, double value2)
public CharDoubleHashMap withKeysValues(char key1, double value1, char key2, double value2, char key3, double value3)
public CharDoubleHashMap withKeysValues(char key1, double value1, char key2, double value2, char key3, double value3, char key4, double value4)
public CharDoubleHashMap withoutKey(char key)
withoutKey in interface MutableCharDoubleMappublic CharDoubleHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys in interface MutableCharDoubleMappublic MutableCharDoubleMap asUnmodifiable()
asUnmodifiable in interface MutableCharDoubleMappublic MutableCharDoubleMap asSynchronized()
asSynchronized in interface MutableCharDoubleMappublic ImmutableCharDoubleMap toImmutable()
toImmutable in interface CharDoubleMappublic double get(char key)
get in interface CharDoubleMappublic double getIfAbsent(char key,
double ifAbsent)
getIfAbsent in interface CharDoubleMappublic double getOrThrow(char key)
getOrThrow in interface CharDoubleMappublic boolean containsKey(char key)
containsKey in interface CharDoubleMapcontainsKey in interface CharKeysMappublic void forEachKey(CharProcedure procedure)
forEachKey in interface CharDoubleMapforEachKey in interface CharKeysMappublic void forEachKeyValue(CharDoubleProcedure procedure)
forEachKeyValue in interface CharDoubleMappublic LazyCharIterable keysView()
keysView in interface CharDoubleMappublic RichIterable<CharDoublePair> keyValuesView()
keyValuesView in interface CharDoubleMappublic MutableDoubleCharMap flipUniqueValues()
CharDoubleMapflipUniqueValues in interface CharDoubleMapflipUniqueValues in interface MutableCharDoubleMappublic CharDoubleHashMap select(CharDoublePredicate predicate)
select in interface CharDoubleMapselect in interface MutableCharDoubleMappublic CharDoubleHashMap reject(CharDoublePredicate predicate)
reject in interface CharDoubleMapreject in interface MutableCharDoubleMappublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void compact()
public MutableCharSet keySet()
keySet in interface CharDoubleMappublic MutableDoubleCollection values()
values in interface DoubleValuesMapCopyright © 2004–2019. All rights reserved.