java.io.Externalizable
, java.io.Serializable
, ByteIterable
, ByteValuesMap
, DoubleByteMap
, MutableByteValuesMap
, MutableDoubleByteMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleByteHashMap extends AbstractMutableByteValuesMap implements MutableDoubleByteMap, java.io.Externalizable, MutableDoubleKeysMap
Constructor | Description |
---|---|
DoubleByteHashMap() |
|
DoubleByteHashMap(int initialCapacity) |
|
DoubleByteHashMap(DoubleByteMap map) |
Modifier and Type | Method | Description |
---|---|---|
byte |
addToValue(double key,
byte toBeAdded) |
|
MutableDoubleByteMap |
asSynchronized() |
|
MutableDoubleByteMap |
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(double key) |
|
boolean |
equals(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableByteDoubleMap |
flipUniqueValues() |
Return the ByteDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleByteProcedure procedure) |
|
byte |
get(double key) |
|
byte |
getIfAbsent(double key,
byte ifAbsent) |
|
byte |
getIfAbsentPut(double key,
byte value) |
|
byte |
getIfAbsentPut(double key,
ByteFunction0 function) |
|
<P> byte |
getIfAbsentPutWith(double key,
ByteFunction<? super P> function,
P parameter) |
|
byte |
getIfAbsentPutWithKey(double key,
DoubleToByteFunction function) |
|
byte |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectByteToObjectFunction<? super V,? extends V> function) |
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleBytePair> |
keyValuesView() |
|
static DoubleByteHashMap |
newWithKeysValues(double key1,
byte value1) |
|
static DoubleByteHashMap |
newWithKeysValues(double key1,
byte value1,
double key2,
byte value2) |
|
static DoubleByteHashMap |
newWithKeysValues(double key1,
byte value1,
double key2,
byte value2,
double key3,
byte value3) |
|
static DoubleByteHashMap |
newWithKeysValues(double key1,
byte value1,
double key2,
byte value2,
double key3,
byte value3,
double key4,
byte value4) |
|
void |
put(double key,
byte value) |
|
void |
putAll(DoubleByteMap map) |
|
void |
readExternal(java.io.ObjectInput in) |
|
DoubleByteHashMap |
reject(DoubleBytePredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
byte |
removeKeyIfAbsent(double key,
byte value) |
|
DoubleByteHashMap |
select(DoubleBytePredicate predicate) |
|
ImmutableDoubleByteMap |
toImmutable() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
byte |
updateValue(double key,
byte initialValueIfAbsent,
ByteToByteFunction function) |
|
void |
updateValues(DoubleByteToByteFunction function) |
Updates the values in-place.
|
MutableByteCollection |
values() |
|
DoubleByteHashMap |
withKeysValues(double key1,
byte value1,
double key2,
byte value2) |
|
DoubleByteHashMap |
withKeysValues(double key1,
byte value1,
double key2,
byte value2,
double key3,
byte value3) |
|
DoubleByteHashMap |
withKeysValues(double key1,
byte value1,
double key2,
byte value2,
double key3,
byte value3,
double key4,
byte value4) |
|
DoubleByteHashMap |
withKeyValue(double key1,
byte value1) |
|
DoubleByteHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleByteHashMap |
withoutKey(double key) |
|
void |
writeExternal(java.io.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 DoubleByteHashMap()
public DoubleByteHashMap(int initialCapacity)
public DoubleByteHashMap(DoubleByteMap map)
public static DoubleByteHashMap newWithKeysValues(double key1, byte value1)
public static DoubleByteHashMap newWithKeysValues(double key1, byte value1, double key2, byte value2)
public static DoubleByteHashMap newWithKeysValues(double key1, byte value1, double key2, byte value2, double key3, byte value3)
public static DoubleByteHashMap newWithKeysValues(double key1, byte value1, double key2, byte value2, double key3, byte value3, double key4, byte value4)
public boolean equals(java.lang.Object obj)
DoubleByteMap
Map.equals(Object)
.equals
in interface DoubleByteMap
equals
in class java.lang.Object
public int hashCode()
DoubleByteMap
Map.hashCode()
.hashCode
in interface DoubleByteMap
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 DoubleByteMap
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 MutableDoubleKeysMap
public void put(double key, byte value)
put
in interface MutableDoubleByteMap
public void putAll(DoubleByteMap map)
putAll
in interface MutableDoubleByteMap
public void updateValues(DoubleByteToByteFunction function)
MutableDoubleByteMap
updateValues
in interface MutableDoubleByteMap
function
- that takes a key and its value and that returns a new value for this keypublic void removeKey(double key)
removeKey
in interface MutableDoubleByteMap
removeKey
in interface MutableDoubleKeysMap
public void remove(double key)
remove
in interface MutableDoubleByteMap
public byte removeKeyIfAbsent(double key, byte value)
removeKeyIfAbsent
in interface MutableDoubleByteMap
public byte getIfAbsentPut(double key, byte value)
getIfAbsentPut
in interface MutableDoubleByteMap
public byte getIfAbsentPut(double key, ByteFunction0 function)
getIfAbsentPut
in interface MutableDoubleByteMap
public <P> byte getIfAbsentPutWith(double key, ByteFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleByteMap
public byte getIfAbsentPutWithKey(double key, DoubleToByteFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleByteMap
public byte addToValue(double key, byte toBeAdded)
addToValue
in interface MutableDoubleByteMap
public byte updateValue(double key, byte initialValueIfAbsent, ByteToByteFunction function)
updateValue
in interface MutableDoubleByteMap
public DoubleByteHashMap withKeyValue(double key1, byte value1)
withKeyValue
in interface MutableDoubleByteMap
public DoubleByteHashMap withKeysValues(double key1, byte value1, double key2, byte value2)
public DoubleByteHashMap withKeysValues(double key1, byte value1, double key2, byte value2, double key3, byte value3)
public DoubleByteHashMap withKeysValues(double key1, byte value1, double key2, byte value2, double key3, byte value3, double key4, byte value4)
public DoubleByteHashMap withoutKey(double key)
withoutKey
in interface MutableDoubleByteMap
public DoubleByteHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleByteMap
public MutableDoubleByteMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleByteMap
public MutableDoubleByteMap asSynchronized()
asSynchronized
in interface MutableDoubleByteMap
public ImmutableDoubleByteMap toImmutable()
toImmutable
in interface DoubleByteMap
public byte get(double key)
get
in interface DoubleByteMap
public byte getIfAbsent(double key, byte ifAbsent)
getIfAbsent
in interface DoubleByteMap
public byte getOrThrow(double key)
getOrThrow
in interface DoubleByteMap
public boolean containsKey(double key)
containsKey
in interface DoubleByteMap
containsKey
in interface DoubleKeysMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleByteMap
forEachKey
in interface DoubleKeysMap
public void forEachKeyValue(DoubleByteProcedure procedure)
forEachKeyValue
in interface DoubleByteMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleByteMap
public RichIterable<DoubleBytePair> keyValuesView()
keyValuesView
in interface DoubleByteMap
public MutableByteDoubleMap flipUniqueValues()
DoubleByteMap
flipUniqueValues
in interface DoubleByteMap
flipUniqueValues
in interface MutableDoubleByteMap
public DoubleByteHashMap select(DoubleBytePredicate predicate)
select
in interface DoubleByteMap
select
in interface MutableDoubleByteMap
public DoubleByteHashMap reject(DoubleBytePredicate predicate)
reject
in interface DoubleByteMap
reject
in interface MutableDoubleByteMap
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 DoubleByteMap
public MutableByteCollection values()
values
in interface ByteValuesMap
Copyright © 2004–2020. All rights reserved.