Externalizable
, Serializable
, ByteIterable
, ByteValuesMap
, LongByteMap
, MutableByteValuesMap
, MutableLongByteMap
, PrimitiveIterable
, MutableLongKeysMap
, LongKeysMap
public class LongByteHashMap extends AbstractMutableByteValuesMap implements MutableLongByteMap, Externalizable, MutableLongKeysMap
Constructor | Description |
---|---|
LongByteHashMap() |
|
LongByteHashMap(int initialCapacity) |
|
LongByteHashMap(LongByteMap map) |
Modifier and Type | Method | Description |
---|---|---|
byte |
addToValue(long key,
byte toBeAdded) |
|
MutableLongByteMap |
asSynchronized() |
|
MutableLongByteMap |
asUnmodifiable() |
|
MutableByteIterator |
byteIterator() |
Returns a primitive iterator that can be used to iterate over the ByteIterable 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(long key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableByteLongMap |
flipUniqueValues() |
Return the ByteLongMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(LongProcedure procedure) |
|
void |
forEachKeyValue(LongByteProcedure procedure) |
|
byte |
get(long key) |
|
byte |
getIfAbsent(long key,
byte ifAbsent) |
|
byte |
getIfAbsentPut(long key,
byte value) |
|
byte |
getIfAbsentPut(long key,
ByteFunction0 function) |
|
<P> byte |
getIfAbsentPutWith(long key,
ByteFunction<? super P> function,
P parameter) |
|
byte |
getIfAbsentPutWithKey(long key,
LongToByteFunction function) |
|
byte |
getOrThrow(long key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectByteToObjectFunction<? super V,? extends V> function) |
|
MutableLongSet |
keySet() |
|
LazyLongIterable |
keysView() |
|
RichIterable<LongBytePair> |
keyValuesView() |
|
static LongByteHashMap |
newWithKeysValues(long key1,
byte value1) |
|
static LongByteHashMap |
newWithKeysValues(long key1,
byte value1,
long key2,
byte value2) |
|
static LongByteHashMap |
newWithKeysValues(long key1,
byte value1,
long key2,
byte value2,
long key3,
byte value3) |
|
static LongByteHashMap |
newWithKeysValues(long key1,
byte value1,
long key2,
byte value2,
long key3,
byte value3,
long key4,
byte value4) |
|
void |
put(long key,
byte value) |
|
void |
putAll(LongByteMap map) |
|
void |
readExternal(ObjectInput in) |
|
LongByteHashMap |
reject(LongBytePredicate predicate) |
|
void |
remove(long key) |
|
void |
removeKey(long key) |
|
byte |
removeKeyIfAbsent(long key,
byte value) |
|
LongByteHashMap |
select(LongBytePredicate predicate) |
|
ImmutableLongByteMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
byte |
updateValue(long key,
byte initialValueIfAbsent,
ByteToByteFunction function) |
|
void |
updateValues(LongByteToByteFunction function) |
Updates the values in-place.
|
MutableByteCollection |
values() |
|
LongByteHashMap |
withKeysValues(long key1,
byte value1,
long key2,
byte value2) |
|
LongByteHashMap |
withKeysValues(long key1,
byte value1,
long key2,
byte value2,
long key3,
byte value3) |
|
LongByteHashMap |
withKeysValues(long key1,
byte value1,
long key2,
byte value2,
long key3,
byte value3,
long key4,
byte value4) |
|
LongByteHashMap |
withKeyValue(long key1,
byte value1) |
|
LongByteHashMap |
withoutAllKeys(LongIterable keys) |
|
LongByteHashMap |
withoutKey(long key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
allSatisfy, 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, toSortedList
containsValue, forEachValue, tap
isEmpty, notEmpty, size
collect, reject, select
putPair, withAllKeyValues
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public LongByteHashMap()
public LongByteHashMap(int initialCapacity)
public LongByteHashMap(LongByteMap map)
public static LongByteHashMap newWithKeysValues(long key1, byte value1)
public static LongByteHashMap newWithKeysValues(long key1, byte value1, long key2, byte value2)
public static LongByteHashMap newWithKeysValues(long key1, byte value1, long key2, byte value2, long key3, byte value3)
public static LongByteHashMap newWithKeysValues(long key1, byte value1, long key2, byte value2, long key3, byte value3, long key4, byte value4)
public boolean equals(Object obj)
LongByteMap
Map.equals(Object)
.equals
in interface LongByteMap
equals
in class Object
public int hashCode()
LongByteMap
Map.hashCode()
.hashCode
in interface LongByteMap
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 LongByteMap
toString
in interface PrimitiveIterable
toString
in class AbstractByteIterable
AbstractCollection.toString()
public MutableByteIterator byteIterator()
ByteIterable
byteIterator
in interface ByteIterable
byteIterator
in interface MutableByteValuesMap
public <V> V injectInto(V injectedValue, ObjectByteToObjectFunction<? super V,? extends V> function)
injectInto
in interface ByteIterable
public void clear()
clear
in interface MutableByteValuesMap
clear
in interface MutableLongKeysMap
public void put(long key, byte value)
put
in interface MutableLongByteMap
public void putAll(LongByteMap map)
putAll
in interface MutableLongByteMap
public void updateValues(LongByteToByteFunction function)
MutableLongByteMap
updateValues
in interface MutableLongByteMap
function
- that takes a key and its value and that returns a new value for this keypublic void removeKey(long key)
removeKey
in interface MutableLongByteMap
removeKey
in interface MutableLongKeysMap
public void remove(long key)
remove
in interface MutableLongByteMap
public byte removeKeyIfAbsent(long key, byte value)
removeKeyIfAbsent
in interface MutableLongByteMap
public byte getIfAbsentPut(long key, byte value)
getIfAbsentPut
in interface MutableLongByteMap
public byte getIfAbsentPut(long key, ByteFunction0 function)
getIfAbsentPut
in interface MutableLongByteMap
public <P> byte getIfAbsentPutWith(long key, ByteFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableLongByteMap
public byte getIfAbsentPutWithKey(long key, LongToByteFunction function)
getIfAbsentPutWithKey
in interface MutableLongByteMap
public byte addToValue(long key, byte toBeAdded)
addToValue
in interface MutableLongByteMap
public byte updateValue(long key, byte initialValueIfAbsent, ByteToByteFunction function)
updateValue
in interface MutableLongByteMap
public LongByteHashMap withKeyValue(long key1, byte value1)
withKeyValue
in interface MutableLongByteMap
public LongByteHashMap withKeysValues(long key1, byte value1, long key2, byte value2)
public LongByteHashMap withKeysValues(long key1, byte value1, long key2, byte value2, long key3, byte value3)
public LongByteHashMap withKeysValues(long key1, byte value1, long key2, byte value2, long key3, byte value3, long key4, byte value4)
public LongByteHashMap withoutKey(long key)
withoutKey
in interface MutableLongByteMap
public LongByteHashMap withoutAllKeys(LongIterable keys)
withoutAllKeys
in interface MutableLongByteMap
public MutableLongByteMap asUnmodifiable()
asUnmodifiable
in interface MutableLongByteMap
public MutableLongByteMap asSynchronized()
asSynchronized
in interface MutableLongByteMap
public ImmutableLongByteMap toImmutable()
toImmutable
in interface LongByteMap
public byte get(long key)
get
in interface LongByteMap
public byte getIfAbsent(long key, byte ifAbsent)
getIfAbsent
in interface LongByteMap
public byte getOrThrow(long key)
getOrThrow
in interface LongByteMap
public boolean containsKey(long key)
containsKey
in interface LongByteMap
containsKey
in interface LongKeysMap
public void forEachKey(LongProcedure procedure)
forEachKey
in interface LongByteMap
forEachKey
in interface LongKeysMap
public void forEachKeyValue(LongByteProcedure procedure)
forEachKeyValue
in interface LongByteMap
public LazyLongIterable keysView()
keysView
in interface LongByteMap
public RichIterable<LongBytePair> keyValuesView()
keyValuesView
in interface LongByteMap
public MutableByteLongMap flipUniqueValues()
LongByteMap
flipUniqueValues
in interface LongByteMap
flipUniqueValues
in interface MutableLongByteMap
public LongByteHashMap select(LongBytePredicate predicate)
select
in interface LongByteMap
select
in interface MutableLongByteMap
public LongByteHashMap reject(LongBytePredicate predicate)
reject
in interface LongByteMap
reject
in interface MutableLongByteMap
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 MutableLongSet keySet()
keySet
in interface LongByteMap
public MutableByteCollection values()
values
in interface ByteValuesMap
Copyright © 2004–2019. All rights reserved.