java.io.Externalizable
, java.io.Serializable
, CharIterable
, CharValuesMap
, DoubleCharMap
, MutableCharValuesMap
, MutableDoubleCharMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleCharHashMap extends AbstractMutableCharValuesMap implements MutableDoubleCharMap, java.io.Externalizable, MutableDoubleKeysMap
Constructor | Description |
---|---|
DoubleCharHashMap() |
|
DoubleCharHashMap(int initialCapacity) |
|
DoubleCharHashMap(DoubleCharMap map) |
Modifier and Type | Method | Description |
---|---|---|
char |
addToValue(double key,
char toBeAdded) |
|
MutableDoubleCharMap |
asSynchronized() |
|
MutableDoubleCharMap |
asUnmodifiable() |
|
MutableCharIterator |
charIterator() |
Returns a primitive iterator that can be used to iterate over the CharIterable in an
imperative style.
|
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(double key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableCharDoubleMap |
flipUniqueValues() |
Return the CharDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleCharProcedure procedure) |
|
char |
get(double key) |
|
char |
getIfAbsent(double key,
char ifAbsent) |
|
char |
getIfAbsentPut(double key,
char value) |
|
char |
getIfAbsentPut(double key,
CharFunction0 function) |
|
<P> char |
getIfAbsentPutWith(double key,
CharFunction<? super P> function,
P parameter) |
|
char |
getIfAbsentPutWithKey(double key,
DoubleToCharFunction function) |
|
char |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectCharToObjectFunction<? super V,? extends V> function) |
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleCharPair> |
keyValuesView() |
|
static DoubleCharHashMap |
newWithKeysValues(double key1,
char value1) |
|
static DoubleCharHashMap |
newWithKeysValues(double key1,
char value1,
double key2,
char value2) |
|
static DoubleCharHashMap |
newWithKeysValues(double key1,
char value1,
double key2,
char value2,
double key3,
char value3) |
|
static DoubleCharHashMap |
newWithKeysValues(double key1,
char value1,
double key2,
char value2,
double key3,
char value3,
double key4,
char value4) |
|
void |
put(double key,
char value) |
|
void |
putAll(DoubleCharMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
DoubleCharHashMap |
reject(DoubleCharPredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
char |
removeKeyIfAbsent(double key,
char value) |
|
DoubleCharHashMap |
select(DoubleCharPredicate predicate) |
|
ImmutableDoubleCharMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
char |
updateValue(double key,
char initialValueIfAbsent,
CharToCharFunction function) |
|
MutableCharCollection |
values() |
|
DoubleCharHashMap |
withKeysValues(double key1,
char value1,
double key2,
char value2) |
|
DoubleCharHashMap |
withKeysValues(double key1,
char value1,
double key2,
char value2,
double key3,
char value3) |
|
DoubleCharHashMap |
withKeysValues(double key1,
char value1,
double key2,
char value2,
double key3,
char value3,
double key4,
char value4) |
|
DoubleCharHashMap |
withKeyValue(double key1,
char value1) |
|
DoubleCharHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleCharHashMap |
withoutKey(double key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue, tap
isEmpty, notEmpty, size
collect, reject, select
putPair
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public DoubleCharHashMap()
public DoubleCharHashMap(int initialCapacity)
public DoubleCharHashMap(DoubleCharMap map)
public static DoubleCharHashMap newWithKeysValues(double key1, char value1)
public static DoubleCharHashMap newWithKeysValues(double key1, char value1, double key2, char value2)
public static DoubleCharHashMap newWithKeysValues(double key1, char value1, double key2, char value2, double key3, char value3)
public static DoubleCharHashMap newWithKeysValues(double key1, char value1, double key2, char value2, double key3, char value3, double key4, char value4)
public boolean equals(java.lang.Object obj)
DoubleCharMap
Map.equals(Object)
.equals
in interface DoubleCharMap
equals
in class java.lang.Object
public int hashCode()
DoubleCharMap
Map.hashCode()
.hashCode
in interface DoubleCharMap
hashCode
in class java.lang.Object
public java.lang.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 DoubleCharMap
toString
in interface PrimitiveIterable
toString
in class AbstractCharIterable
AbstractCollection.toString()
public MutableCharIterator charIterator()
CharIterable
charIterator
in interface CharIterable
charIterator
in interface MutableCharValuesMap
public <V> V injectInto(V injectedValue, ObjectCharToObjectFunction<? super V,? extends V> function)
injectInto
in interface CharIterable
public void clear()
clear
in interface MutableCharValuesMap
clear
in interface MutableDoubleKeysMap
public void put(double key, char value)
put
in interface MutableDoubleCharMap
public void putAll(DoubleCharMap map)
putAll
in interface MutableDoubleCharMap
public void removeKey(double key)
removeKey
in interface MutableDoubleCharMap
removeKey
in interface MutableDoubleKeysMap
public void remove(double key)
remove
in interface MutableDoubleCharMap
public char removeKeyIfAbsent(double key, char value)
removeKeyIfAbsent
in interface MutableDoubleCharMap
public char getIfAbsentPut(double key, char value)
getIfAbsentPut
in interface MutableDoubleCharMap
public char getIfAbsentPut(double key, CharFunction0 function)
getIfAbsentPut
in interface MutableDoubleCharMap
public <P> char getIfAbsentPutWith(double key, CharFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleCharMap
public char getIfAbsentPutWithKey(double key, DoubleToCharFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleCharMap
public char addToValue(double key, char toBeAdded)
addToValue
in interface MutableDoubleCharMap
public char updateValue(double key, char initialValueIfAbsent, CharToCharFunction function)
updateValue
in interface MutableDoubleCharMap
public DoubleCharHashMap withKeyValue(double key1, char value1)
withKeyValue
in interface MutableDoubleCharMap
public DoubleCharHashMap withKeysValues(double key1, char value1, double key2, char value2)
public DoubleCharHashMap withKeysValues(double key1, char value1, double key2, char value2, double key3, char value3)
public DoubleCharHashMap withKeysValues(double key1, char value1, double key2, char value2, double key3, char value3, double key4, char value4)
public DoubleCharHashMap withoutKey(double key)
withoutKey
in interface MutableDoubleCharMap
public DoubleCharHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleCharMap
public MutableDoubleCharMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleCharMap
public MutableDoubleCharMap asSynchronized()
asSynchronized
in interface MutableDoubleCharMap
public ImmutableDoubleCharMap toImmutable()
toImmutable
in interface DoubleCharMap
public char get(double key)
get
in interface DoubleCharMap
public char getIfAbsent(double key, char ifAbsent)
getIfAbsent
in interface DoubleCharMap
public char getOrThrow(double key)
getOrThrow
in interface DoubleCharMap
public boolean containsKey(double key)
containsKey
in interface DoubleCharMap
containsKey
in interface DoubleKeysMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleCharMap
forEachKey
in interface DoubleKeysMap
public void forEachKeyValue(DoubleCharProcedure procedure)
forEachKeyValue
in interface DoubleCharMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleCharMap
public RichIterable<DoubleCharPair> keyValuesView()
keyValuesView
in interface DoubleCharMap
public MutableCharDoubleMap flipUniqueValues()
DoubleCharMap
flipUniqueValues
in interface DoubleCharMap
flipUniqueValues
in interface MutableDoubleCharMap
public DoubleCharHashMap select(DoubleCharPredicate predicate)
select
in interface DoubleCharMap
select
in interface MutableDoubleCharMap
public DoubleCharHashMap reject(DoubleCharPredicate predicate)
reject
in interface DoubleCharMap
reject
in interface MutableDoubleCharMap
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void compact()
public MutableDoubleSet keySet()
keySet
in interface DoubleCharMap
public MutableCharCollection values()
values
in interface CharValuesMap
Copyright © 2004–2018. All rights reserved.