Externalizable
, Serializable
, LongIterable
, CharLongMap
, LongValuesMap
, MutableCharLongMap
, MutableLongValuesMap
, PrimitiveIterable
, MutableCharKeysMap
, CharKeysMap
public class CharLongHashMap extends AbstractMutableLongValuesMap implements MutableCharLongMap, Externalizable, MutableCharKeysMap
Constructor | Description |
---|---|
CharLongHashMap() |
|
CharLongHashMap(int initialCapacity) |
|
CharLongHashMap(CharLongMap map) |
Modifier and Type | Method | Description |
---|---|---|
long |
addToValue(char key,
long toBeAdded) |
|
MutableCharLongMap |
asSynchronized() |
|
MutableCharLongMap |
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) . |
void |
forEachKey(CharProcedure procedure) |
|
void |
forEachKeyValue(CharLongProcedure procedure) |
|
long |
get(char key) |
|
long |
getIfAbsent(char key,
long ifAbsent) |
|
long |
getIfAbsentPut(char key,
long value) |
|
long |
getIfAbsentPut(char key,
LongFunction0 function) |
|
<P> long |
getIfAbsentPutWith(char key,
LongFunction<? super P> function,
P parameter) |
|
long |
getIfAbsentPutWithKey(char key,
CharToLongFunction function) |
|
long |
getOrThrow(char key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function) |
|
MutableCharSet |
keySet() |
|
LazyCharIterable |
keysView() |
|
RichIterable<CharLongPair> |
keyValuesView() |
|
MutableLongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
static CharLongHashMap |
newWithKeysValues(char key1,
long value1) |
|
static CharLongHashMap |
newWithKeysValues(char key1,
long value1,
char key2,
long value2) |
|
static CharLongHashMap |
newWithKeysValues(char key1,
long value1,
char key2,
long value2,
char key3,
long value3) |
|
static CharLongHashMap |
newWithKeysValues(char key1,
long value1,
char key2,
long value2,
char key3,
long value3,
char key4,
long value4) |
|
void |
put(char key,
long value) |
|
void |
putAll(CharLongMap map) |
|
void |
readExternal(ObjectInput in) |
|
CharLongHashMap |
reject(CharLongPredicate predicate) |
|
void |
remove(char key) |
|
void |
removeKey(char key) |
|
long |
removeKeyIfAbsent(char key,
long value) |
|
CharLongHashMap |
select(CharLongPredicate predicate) |
|
ImmutableCharLongMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
long |
updateValue(char key,
long initialValueIfAbsent,
LongToLongFunction function) |
|
MutableLongCollection |
values() |
|
CharLongHashMap |
withKeysValues(char key1,
long value1,
char key2,
long value2) |
|
CharLongHashMap |
withKeysValues(char key1,
long value1,
char key2,
long value2,
char key3,
long value3) |
|
CharLongHashMap |
withKeysValues(char key1,
long value1,
char key2,
long value2,
char key3,
long value3,
char key4,
long value4) |
|
CharLongHashMap |
withKeyValue(char key1,
long value1) |
|
CharLongHashMap |
withoutAllKeys(CharIterable keys) |
|
CharLongHashMap |
withoutKey(char key) |
|
void |
writeExternal(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
isEmpty, notEmpty, size
allSatisfy, anySatisfy, asLazy, average, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public CharLongHashMap()
public CharLongHashMap(int initialCapacity)
public CharLongHashMap(CharLongMap map)
public static CharLongHashMap newWithKeysValues(char key1, long value1)
public static CharLongHashMap newWithKeysValues(char key1, long value1, char key2, long value2)
public static CharLongHashMap newWithKeysValues(char key1, long value1, char key2, long value2, char key3, long value3)
public static CharLongHashMap newWithKeysValues(char key1, long value1, char key2, long value2, char key3, long value3, char key4, long value4)
public boolean equals(Object obj)
CharLongMap
Map.equals(Object)
.equals
in interface CharLongMap
equals
in class Object
public int hashCode()
CharLongMap
Map.hashCode()
.hashCode
in interface CharLongMap
hashCode
in class Object
public 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 CharLongMap
toString
in interface PrimitiveIterable
toString
in class AbstractLongIterable
AbstractCollection.toString()
public MutableLongIterator longIterator()
LongIterable
longIterator
in interface LongIterable
longIterator
in interface MutableLongValuesMap
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)
injectInto
in interface LongIterable
public void clear()
clear
in interface MutableCharKeysMap
clear
in interface MutableLongValuesMap
public void put(char key, long value)
put
in interface MutableCharLongMap
public void putAll(CharLongMap map)
putAll
in interface MutableCharLongMap
public void removeKey(char key)
removeKey
in interface MutableCharKeysMap
removeKey
in interface MutableCharLongMap
public void remove(char key)
remove
in interface MutableCharLongMap
public long removeKeyIfAbsent(char key, long value)
removeKeyIfAbsent
in interface MutableCharLongMap
public long getIfAbsentPut(char key, long value)
getIfAbsentPut
in interface MutableCharLongMap
public long getIfAbsentPut(char key, LongFunction0 function)
getIfAbsentPut
in interface MutableCharLongMap
public <P> long getIfAbsentPutWith(char key, LongFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableCharLongMap
public long getIfAbsentPutWithKey(char key, CharToLongFunction function)
getIfAbsentPutWithKey
in interface MutableCharLongMap
public long addToValue(char key, long toBeAdded)
addToValue
in interface MutableCharLongMap
public long updateValue(char key, long initialValueIfAbsent, LongToLongFunction function)
updateValue
in interface MutableCharLongMap
public CharLongHashMap withKeyValue(char key1, long value1)
withKeyValue
in interface MutableCharLongMap
public CharLongHashMap withKeysValues(char key1, long value1, char key2, long value2)
public CharLongHashMap withKeysValues(char key1, long value1, char key2, long value2, char key3, long value3)
public CharLongHashMap withKeysValues(char key1, long value1, char key2, long value2, char key3, long value3, char key4, long value4)
public CharLongHashMap withoutKey(char key)
withoutKey
in interface MutableCharLongMap
public CharLongHashMap withoutAllKeys(CharIterable keys)
withoutAllKeys
in interface MutableCharLongMap
public MutableCharLongMap asUnmodifiable()
asUnmodifiable
in interface MutableCharLongMap
public MutableCharLongMap asSynchronized()
asSynchronized
in interface MutableCharLongMap
public ImmutableCharLongMap toImmutable()
toImmutable
in interface CharLongMap
public long get(char key)
get
in interface CharLongMap
public long getIfAbsent(char key, long ifAbsent)
getIfAbsent
in interface CharLongMap
public long getOrThrow(char key)
getOrThrow
in interface CharLongMap
public boolean containsKey(char key)
containsKey
in interface CharKeysMap
containsKey
in interface CharLongMap
public void forEachKey(CharProcedure procedure)
forEachKey
in interface CharKeysMap
forEachKey
in interface CharLongMap
public void forEachKeyValue(CharLongProcedure procedure)
forEachKeyValue
in interface CharLongMap
public LazyCharIterable keysView()
keysView
in interface CharLongMap
public RichIterable<CharLongPair> keyValuesView()
keyValuesView
in interface CharLongMap
public CharLongHashMap select(CharLongPredicate predicate)
select
in interface CharLongMap
select
in interface MutableCharLongMap
public CharLongHashMap reject(CharLongPredicate predicate)
reject
in interface CharLongMap
reject
in interface MutableCharLongMap
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void compact()
public MutableCharSet keySet()
keySet
in interface CharLongMap
public MutableLongCollection values()
values
in interface LongValuesMap
Copyright © 2004–2017. All rights reserved.