Externalizable, Serializable, FloatIterable, CharFloatMap, FloatValuesMap, MutableCharFloatMap, MutableFloatValuesMap, PrimitiveIterable, MutableCharKeysMap, CharKeysMappublic class CharFloatHashMap extends AbstractMutableFloatValuesMap implements MutableCharFloatMap, Externalizable, MutableCharKeysMap
| Constructor | Description |
|---|---|
CharFloatHashMap() |
|
CharFloatHashMap(int initialCapacity) |
|
CharFloatHashMap(CharFloatMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
float |
addToValue(char key,
float toBeAdded) |
|
MutableCharFloatMap |
asSynchronized() |
|
MutableCharFloatMap |
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) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableFloatCharMap |
flipUniqueValues() |
Return the FloatCharMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
MutableFloatIterator |
floatIterator() |
Returns a primitive iterator that can be used to iterate over the FloatIterable in an
imperative style.
|
void |
forEachKey(CharProcedure procedure) |
|
void |
forEachKeyValue(CharFloatProcedure procedure) |
|
float |
get(char key) |
|
float |
getIfAbsent(char key,
float ifAbsent) |
|
float |
getIfAbsentPut(char key,
float value) |
|
float |
getIfAbsentPut(char key,
FloatFunction0 function) |
|
<P> float |
getIfAbsentPutWith(char key,
FloatFunction<? super P> function,
P parameter) |
|
float |
getIfAbsentPutWithKey(char key,
CharToFloatFunction function) |
|
float |
getOrThrow(char key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectFloatToObjectFunction<? super V,? extends V> function) |
|
MutableCharSet |
keySet() |
|
LazyCharIterable |
keysView() |
|
RichIterable<CharFloatPair> |
keyValuesView() |
|
static CharFloatHashMap |
newWithKeysValues(char key1,
float value1) |
|
static CharFloatHashMap |
newWithKeysValues(char key1,
float value1,
char key2,
float value2) |
|
static CharFloatHashMap |
newWithKeysValues(char key1,
float value1,
char key2,
float value2,
char key3,
float value3) |
|
static CharFloatHashMap |
newWithKeysValues(char key1,
float value1,
char key2,
float value2,
char key3,
float value3,
char key4,
float value4) |
|
void |
put(char key,
float value) |
|
void |
putAll(CharFloatMap map) |
|
void |
readExternal(ObjectInput in) |
|
CharFloatHashMap |
reject(CharFloatPredicate predicate) |
|
void |
remove(char key) |
|
void |
removeKey(char key) |
|
float |
removeKeyIfAbsent(char key,
float value) |
|
CharFloatHashMap |
select(CharFloatPredicate predicate) |
|
ImmutableCharFloatMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
float |
updateValue(char key,
float initialValueIfAbsent,
FloatToFloatFunction function) |
|
void |
updateValues(CharFloatToFloatFunction function) |
Updates the values in-place.
|
MutableFloatCollection |
values() |
|
CharFloatHashMap |
withKeysValues(char key1,
float value1,
char key2,
float value2) |
|
CharFloatHashMap |
withKeysValues(char key1,
float value1,
char key2,
float value2,
char key3,
float value3) |
|
CharFloatHashMap |
withKeysValues(char key1,
float value1,
char key2,
float value2,
char key3,
float value3,
char key4,
float value4) |
|
CharFloatHashMap |
withKeyValue(char key1,
float value1) |
|
CharFloatHashMap |
withoutAllKeys(CharIterable keys) |
|
CharFloatHashMap |
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 CharFloatHashMap()
public CharFloatHashMap(int initialCapacity)
public CharFloatHashMap(CharFloatMap map)
public static CharFloatHashMap newWithKeysValues(char key1, float value1)
public static CharFloatHashMap newWithKeysValues(char key1, float value1, char key2, float value2)
public static CharFloatHashMap newWithKeysValues(char key1, float value1, char key2, float value2, char key3, float value3)
public static CharFloatHashMap newWithKeysValues(char key1, float value1, char key2, float value2, char key3, float value3, char key4, float value4)
public boolean equals(Object obj)
CharFloatMapMap.equals(Object).equals in interface CharFloatMapequals in class Objectpublic int hashCode()
CharFloatMapMap.hashCode().hashCode in interface CharFloatMaphashCode 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 CharFloatMaptoString in interface PrimitiveIterabletoString in class AbstractFloatIterableAbstractCollection.toString()public MutableFloatIterator floatIterator()
FloatIterablefloatIterator in interface FloatIterablefloatIterator in interface MutableFloatValuesMappublic <V> V injectInto(V injectedValue,
ObjectFloatToObjectFunction<? super V,? extends V> function)
injectInto in interface FloatIterablepublic void clear()
clear in interface MutableCharKeysMapclear in interface MutableFloatValuesMappublic void put(char key,
float value)
put in interface MutableCharFloatMappublic void putAll(CharFloatMap map)
putAll in interface MutableCharFloatMappublic void updateValues(CharFloatToFloatFunction function)
MutableCharFloatMapupdateValues in interface MutableCharFloatMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(char key)
removeKey in interface MutableCharFloatMapremoveKey in interface MutableCharKeysMappublic void remove(char key)
remove in interface MutableCharFloatMappublic float removeKeyIfAbsent(char key,
float value)
removeKeyIfAbsent in interface MutableCharFloatMappublic float getIfAbsentPut(char key,
float value)
getIfAbsentPut in interface MutableCharFloatMappublic float getIfAbsentPut(char key,
FloatFunction0 function)
getIfAbsentPut in interface MutableCharFloatMappublic <P> float getIfAbsentPutWith(char key,
FloatFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableCharFloatMappublic float getIfAbsentPutWithKey(char key,
CharToFloatFunction function)
getIfAbsentPutWithKey in interface MutableCharFloatMappublic float addToValue(char key,
float toBeAdded)
addToValue in interface MutableCharFloatMappublic float updateValue(char key,
float initialValueIfAbsent,
FloatToFloatFunction function)
updateValue in interface MutableCharFloatMappublic CharFloatHashMap withKeyValue(char key1, float value1)
withKeyValue in interface MutableCharFloatMappublic CharFloatHashMap withKeysValues(char key1, float value1, char key2, float value2)
public CharFloatHashMap withKeysValues(char key1, float value1, char key2, float value2, char key3, float value3)
public CharFloatHashMap withKeysValues(char key1, float value1, char key2, float value2, char key3, float value3, char key4, float value4)
public CharFloatHashMap withoutKey(char key)
withoutKey in interface MutableCharFloatMappublic CharFloatHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys in interface MutableCharFloatMappublic MutableCharFloatMap asUnmodifiable()
asUnmodifiable in interface MutableCharFloatMappublic MutableCharFloatMap asSynchronized()
asSynchronized in interface MutableCharFloatMappublic ImmutableCharFloatMap toImmutable()
toImmutable in interface CharFloatMappublic float get(char key)
get in interface CharFloatMappublic float getIfAbsent(char key,
float ifAbsent)
getIfAbsent in interface CharFloatMappublic float getOrThrow(char key)
getOrThrow in interface CharFloatMappublic boolean containsKey(char key)
containsKey in interface CharFloatMapcontainsKey in interface CharKeysMappublic void forEachKey(CharProcedure procedure)
forEachKey in interface CharFloatMapforEachKey in interface CharKeysMappublic void forEachKeyValue(CharFloatProcedure procedure)
forEachKeyValue in interface CharFloatMappublic LazyCharIterable keysView()
keysView in interface CharFloatMappublic RichIterable<CharFloatPair> keyValuesView()
keyValuesView in interface CharFloatMappublic MutableFloatCharMap flipUniqueValues()
CharFloatMapflipUniqueValues in interface CharFloatMapflipUniqueValues in interface MutableCharFloatMappublic CharFloatHashMap select(CharFloatPredicate predicate)
select in interface CharFloatMapselect in interface MutableCharFloatMappublic CharFloatHashMap reject(CharFloatPredicate predicate)
reject in interface CharFloatMapreject in interface MutableCharFloatMappublic 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 CharFloatMappublic MutableFloatCollection values()
values in interface FloatValuesMapCopyright © 2004–2019. All rights reserved.