java.io.Externalizable, java.io.Serializable, CharIterable, ByteCharMap, CharValuesMap, MutableByteCharMap, MutableCharValuesMap, PrimitiveIterable, MutableByteKeysMap, ByteKeysMappublic class ByteCharHashMap extends AbstractMutableCharValuesMap implements MutableByteCharMap, java.io.Externalizable, MutableByteKeysMap
| Constructor | Description |
|---|---|
ByteCharHashMap() |
|
ByteCharHashMap(int initialCapacity) |
|
ByteCharHashMap(ByteCharMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
char |
addToValue(byte key,
char toBeAdded) |
|
MutableByteCharMap |
asSynchronized() |
|
MutableByteCharMap |
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(byte key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableCharByteMap |
flipUniqueValues() |
Return the CharByteMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ByteProcedure procedure) |
|
void |
forEachKeyValue(ByteCharProcedure procedure) |
|
char |
get(byte key) |
|
char |
getIfAbsent(byte key,
char ifAbsent) |
|
char |
getIfAbsentPut(byte key,
char value) |
|
char |
getIfAbsentPut(byte key,
CharFunction0 function) |
|
<P> char |
getIfAbsentPutWith(byte key,
CharFunction<? super P> function,
P parameter) |
|
char |
getIfAbsentPutWithKey(byte key,
ByteToCharFunction function) |
|
char |
getOrThrow(byte key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
ObjectCharToObjectFunction<? super V,? extends V> function) |
|
MutableByteSet |
keySet() |
|
LazyByteIterable |
keysView() |
|
RichIterable<ByteCharPair> |
keyValuesView() |
|
static ByteCharHashMap |
newWithKeysValues(byte key1,
char value1) |
|
static ByteCharHashMap |
newWithKeysValues(byte key1,
char value1,
byte key2,
char value2) |
|
static ByteCharHashMap |
newWithKeysValues(byte key1,
char value1,
byte key2,
char value2,
byte key3,
char value3) |
|
static ByteCharHashMap |
newWithKeysValues(byte key1,
char value1,
byte key2,
char value2,
byte key3,
char value3,
byte key4,
char value4) |
|
void |
put(byte key,
char value) |
|
void |
putAll(ByteCharMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
ByteCharHashMap |
reject(ByteCharPredicate predicate) |
|
void |
remove(byte key) |
|
void |
removeKey(byte key) |
|
char |
removeKeyIfAbsent(byte key,
char value) |
|
ByteCharHashMap |
select(ByteCharPredicate predicate) |
|
ImmutableByteCharMap |
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(byte key,
char initialValueIfAbsent,
CharToCharFunction function) |
|
MutableCharCollection |
values() |
|
ByteCharHashMap |
withKeysValues(byte key1,
char value1,
byte key2,
char value2) |
|
ByteCharHashMap |
withKeysValues(byte key1,
char value1,
byte key2,
char value2,
byte key3,
char value3) |
|
ByteCharHashMap |
withKeysValues(byte key1,
char value1,
byte key2,
char value2,
byte key3,
char value3,
byte key4,
char value4) |
|
ByteCharHashMap |
withKeyValue(byte key1,
char value1) |
|
ByteCharHashMap |
withoutAllKeys(ByteIterable keys) |
|
ByteCharHashMap |
withoutKey(byte key) |
|
void |
writeExternal(java.io.ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListallSatisfy, anySatisfy, appendString, 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, 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, toSortedListcontainsValue, forEachValue, tapcollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizepublic ByteCharHashMap()
public ByteCharHashMap(int initialCapacity)
public ByteCharHashMap(ByteCharMap map)
public static ByteCharHashMap newWithKeysValues(byte key1, char value1)
public static ByteCharHashMap newWithKeysValues(byte key1, char value1, byte key2, char value2)
public static ByteCharHashMap newWithKeysValues(byte key1, char value1, byte key2, char value2, byte key3, char value3)
public static ByteCharHashMap newWithKeysValues(byte key1, char value1, byte key2, char value2, byte key3, char value3, byte key4, char value4)
public boolean equals(java.lang.Object obj)
ByteCharMapMap.equals(Object).equals in interface ByteCharMapequals in class java.lang.Objectpublic int hashCode()
ByteCharMapMap.hashCode().hashCode in interface ByteCharMaphashCode in class java.lang.Objectpublic 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 ByteCharMaptoString in interface PrimitiveIterabletoString in class AbstractCharIterableAbstractCollection.toString()public MutableCharIterator charIterator()
CharIterablecharIterator in interface CharIterablecharIterator in interface MutableCharValuesMappublic <V> V injectInto(V injectedValue,
ObjectCharToObjectFunction<? super V,? extends V> function)
injectInto in interface CharIterablepublic void clear()
clear in interface MutableByteKeysMapclear in interface MutableCharValuesMappublic void put(byte key,
char value)
put in interface MutableByteCharMappublic void putAll(ByteCharMap map)
putAll in interface MutableByteCharMappublic void removeKey(byte key)
removeKey in interface MutableByteCharMapremoveKey in interface MutableByteKeysMappublic void remove(byte key)
remove in interface MutableByteCharMappublic char removeKeyIfAbsent(byte key,
char value)
removeKeyIfAbsent in interface MutableByteCharMappublic char getIfAbsentPut(byte key,
char value)
getIfAbsentPut in interface MutableByteCharMappublic char getIfAbsentPut(byte key,
CharFunction0 function)
getIfAbsentPut in interface MutableByteCharMappublic <P> char getIfAbsentPutWith(byte key,
CharFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableByteCharMappublic char getIfAbsentPutWithKey(byte key,
ByteToCharFunction function)
getIfAbsentPutWithKey in interface MutableByteCharMappublic char addToValue(byte key,
char toBeAdded)
addToValue in interface MutableByteCharMappublic char updateValue(byte key,
char initialValueIfAbsent,
CharToCharFunction function)
updateValue in interface MutableByteCharMappublic ByteCharHashMap withKeyValue(byte key1, char value1)
withKeyValue in interface MutableByteCharMappublic ByteCharHashMap withKeysValues(byte key1, char value1, byte key2, char value2)
public ByteCharHashMap withKeysValues(byte key1, char value1, byte key2, char value2, byte key3, char value3)
public ByteCharHashMap withKeysValues(byte key1, char value1, byte key2, char value2, byte key3, char value3, byte key4, char value4)
public ByteCharHashMap withoutKey(byte key)
withoutKey in interface MutableByteCharMappublic ByteCharHashMap withoutAllKeys(ByteIterable keys)
withoutAllKeys in interface MutableByteCharMappublic MutableByteCharMap asUnmodifiable()
asUnmodifiable in interface MutableByteCharMappublic MutableByteCharMap asSynchronized()
asSynchronized in interface MutableByteCharMappublic ImmutableByteCharMap toImmutable()
toImmutable in interface ByteCharMappublic char get(byte key)
get in interface ByteCharMappublic char getIfAbsent(byte key,
char ifAbsent)
getIfAbsent in interface ByteCharMappublic char getOrThrow(byte key)
getOrThrow in interface ByteCharMappublic boolean containsKey(byte key)
containsKey in interface ByteCharMapcontainsKey in interface ByteKeysMappublic void forEachKey(ByteProcedure procedure)
forEachKey in interface ByteCharMapforEachKey in interface ByteKeysMappublic void forEachKeyValue(ByteCharProcedure procedure)
forEachKeyValue in interface ByteCharMappublic LazyByteIterable keysView()
keysView in interface ByteCharMappublic RichIterable<ByteCharPair> keyValuesView()
keyValuesView in interface ByteCharMappublic MutableCharByteMap flipUniqueValues()
ByteCharMapflipUniqueValues in interface ByteCharMapflipUniqueValues in interface MutableByteCharMappublic ByteCharHashMap select(ByteCharPredicate predicate)
select in interface ByteCharMapselect in interface MutableByteCharMappublic ByteCharHashMap reject(ByteCharPredicate predicate)
reject in interface ByteCharMapreject in interface MutableByteCharMappublic 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 void compact()
public MutableByteSet keySet()
keySet in interface ByteCharMappublic MutableCharCollection values()
values in interface CharValuesMapCopyright © 2004–2017. All rights reserved.