Externalizable
, Serializable
, ByteIterable
, ByteValuesMap
, FloatByteMap
, MutableByteValuesMap
, MutableFloatByteMap
, PrimitiveIterable
, MutableFloatKeysMap
, FloatKeysMap
public class FloatByteHashMap extends AbstractMutableByteValuesMap implements MutableFloatByteMap, Externalizable, MutableFloatKeysMap
Constructor | Description |
---|---|
FloatByteHashMap() |
|
FloatByteHashMap(int initialCapacity) |
|
FloatByteHashMap(FloatByteMap map) |
Modifier and Type | Method | Description |
---|---|---|
byte |
addToValue(float key,
byte toBeAdded) |
|
MutableFloatByteMap |
asSynchronized() |
|
MutableFloatByteMap |
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(float key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableByteFloatMap |
flipUniqueValues() |
Return the ByteFloatMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(FloatProcedure procedure) |
|
void |
forEachKeyValue(FloatByteProcedure procedure) |
|
byte |
get(float key) |
|
byte |
getIfAbsent(float key,
byte ifAbsent) |
|
byte |
getIfAbsentPut(float key,
byte value) |
|
byte |
getIfAbsentPut(float key,
ByteFunction0 function) |
|
<P> byte |
getIfAbsentPutWith(float key,
ByteFunction<? super P> function,
P parameter) |
|
byte |
getIfAbsentPutWithKey(float key,
FloatToByteFunction function) |
|
byte |
getOrThrow(float key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectByteToObjectFunction<? super V,? extends V> function) |
|
MutableFloatSet |
keySet() |
|
LazyFloatIterable |
keysView() |
|
RichIterable<FloatBytePair> |
keyValuesView() |
|
static FloatByteHashMap |
newWithKeysValues(float key1,
byte value1) |
|
static FloatByteHashMap |
newWithKeysValues(float key1,
byte value1,
float key2,
byte value2) |
|
static FloatByteHashMap |
newWithKeysValues(float key1,
byte value1,
float key2,
byte value2,
float key3,
byte value3) |
|
static FloatByteHashMap |
newWithKeysValues(float key1,
byte value1,
float key2,
byte value2,
float key3,
byte value3,
float key4,
byte value4) |
|
void |
put(float key,
byte value) |
|
void |
putAll(FloatByteMap map) |
|
void |
readExternal(ObjectInput in) |
|
FloatByteHashMap |
reject(FloatBytePredicate predicate) |
|
void |
remove(float key) |
|
void |
removeKey(float key) |
|
byte |
removeKeyIfAbsent(float key,
byte value) |
|
FloatByteHashMap |
select(FloatBytePredicate predicate) |
|
ImmutableFloatByteMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
byte |
updateValue(float key,
byte initialValueIfAbsent,
ByteToByteFunction function) |
|
void |
updateValues(FloatByteToByteFunction function) |
Updates the values in-place.
|
MutableByteCollection |
values() |
|
FloatByteHashMap |
withKeysValues(float key1,
byte value1,
float key2,
byte value2) |
|
FloatByteHashMap |
withKeysValues(float key1,
byte value1,
float key2,
byte value2,
float key3,
byte value3) |
|
FloatByteHashMap |
withKeysValues(float key1,
byte value1,
float key2,
byte value2,
float key3,
byte value3,
float key4,
byte value4) |
|
FloatByteHashMap |
withKeyValue(float key1,
byte value1) |
|
FloatByteHashMap |
withoutAllKeys(FloatIterable keys) |
|
FloatByteHashMap |
withoutKey(float 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 FloatByteHashMap()
public FloatByteHashMap(int initialCapacity)
public FloatByteHashMap(FloatByteMap map)
public static FloatByteHashMap newWithKeysValues(float key1, byte value1)
public static FloatByteHashMap newWithKeysValues(float key1, byte value1, float key2, byte value2)
public static FloatByteHashMap newWithKeysValues(float key1, byte value1, float key2, byte value2, float key3, byte value3)
public static FloatByteHashMap newWithKeysValues(float key1, byte value1, float key2, byte value2, float key3, byte value3, float key4, byte value4)
public boolean equals(Object obj)
FloatByteMap
Map.equals(Object)
.equals
in interface FloatByteMap
equals
in class Object
public int hashCode()
FloatByteMap
Map.hashCode()
.hashCode
in interface FloatByteMap
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 FloatByteMap
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 MutableFloatKeysMap
public void put(float key, byte value)
put
in interface MutableFloatByteMap
public void putAll(FloatByteMap map)
putAll
in interface MutableFloatByteMap
public void updateValues(FloatByteToByteFunction function)
MutableFloatByteMap
updateValues
in interface MutableFloatByteMap
function
- that takes a key and its value and that returns a new value for this keypublic void removeKey(float key)
removeKey
in interface MutableFloatByteMap
removeKey
in interface MutableFloatKeysMap
public void remove(float key)
remove
in interface MutableFloatByteMap
public byte removeKeyIfAbsent(float key, byte value)
removeKeyIfAbsent
in interface MutableFloatByteMap
public byte getIfAbsentPut(float key, byte value)
getIfAbsentPut
in interface MutableFloatByteMap
public byte getIfAbsentPut(float key, ByteFunction0 function)
getIfAbsentPut
in interface MutableFloatByteMap
public <P> byte getIfAbsentPutWith(float key, ByteFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableFloatByteMap
public byte getIfAbsentPutWithKey(float key, FloatToByteFunction function)
getIfAbsentPutWithKey
in interface MutableFloatByteMap
public byte addToValue(float key, byte toBeAdded)
addToValue
in interface MutableFloatByteMap
public byte updateValue(float key, byte initialValueIfAbsent, ByteToByteFunction function)
updateValue
in interface MutableFloatByteMap
public FloatByteHashMap withKeyValue(float key1, byte value1)
withKeyValue
in interface MutableFloatByteMap
public FloatByteHashMap withKeysValues(float key1, byte value1, float key2, byte value2)
public FloatByteHashMap withKeysValues(float key1, byte value1, float key2, byte value2, float key3, byte value3)
public FloatByteHashMap withKeysValues(float key1, byte value1, float key2, byte value2, float key3, byte value3, float key4, byte value4)
public FloatByteHashMap withoutKey(float key)
withoutKey
in interface MutableFloatByteMap
public FloatByteHashMap withoutAllKeys(FloatIterable keys)
withoutAllKeys
in interface MutableFloatByteMap
public MutableFloatByteMap asUnmodifiable()
asUnmodifiable
in interface MutableFloatByteMap
public MutableFloatByteMap asSynchronized()
asSynchronized
in interface MutableFloatByteMap
public ImmutableFloatByteMap toImmutable()
toImmutable
in interface FloatByteMap
public byte get(float key)
get
in interface FloatByteMap
public byte getIfAbsent(float key, byte ifAbsent)
getIfAbsent
in interface FloatByteMap
public byte getOrThrow(float key)
getOrThrow
in interface FloatByteMap
public boolean containsKey(float key)
containsKey
in interface FloatByteMap
containsKey
in interface FloatKeysMap
public void forEachKey(FloatProcedure procedure)
forEachKey
in interface FloatByteMap
forEachKey
in interface FloatKeysMap
public void forEachKeyValue(FloatByteProcedure procedure)
forEachKeyValue
in interface FloatByteMap
public LazyFloatIterable keysView()
keysView
in interface FloatByteMap
public RichIterable<FloatBytePair> keyValuesView()
keyValuesView
in interface FloatByteMap
public MutableByteFloatMap flipUniqueValues()
FloatByteMap
flipUniqueValues
in interface FloatByteMap
flipUniqueValues
in interface MutableFloatByteMap
public FloatByteHashMap select(FloatBytePredicate predicate)
select
in interface FloatByteMap
select
in interface MutableFloatByteMap
public FloatByteHashMap reject(FloatBytePredicate predicate)
reject
in interface FloatByteMap
reject
in interface MutableFloatByteMap
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 MutableFloatSet keySet()
keySet
in interface FloatByteMap
public MutableByteCollection values()
values
in interface ByteValuesMap
Copyright © 2004–2019. All rights reserved.