Externalizable
, Serializable
, FloatShortMap
, MutableFloatShortMap
, MutableShortValuesMap
, ShortValuesMap
, PrimitiveIterable
, ShortIterable
, MutableFloatKeysMap
, FloatKeysMap
public class FloatShortHashMap extends AbstractMutableShortValuesMap implements MutableFloatShortMap, Externalizable, MutableFloatKeysMap
Constructor | Description |
---|---|
FloatShortHashMap() |
|
FloatShortHashMap(int initialCapacity) |
|
FloatShortHashMap(FloatShortMap map) |
Modifier and Type | Method | Description |
---|---|---|
short |
addToValue(float key,
short toBeAdded) |
|
MutableFloatShortMap |
asSynchronized() |
|
MutableFloatShortMap |
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(float key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
MutableShortFloatMap |
flipUniqueValues() |
Return the ShortFloatMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(FloatProcedure procedure) |
|
void |
forEachKeyValue(FloatShortProcedure procedure) |
|
short |
get(float key) |
|
short |
getIfAbsent(float key,
short ifAbsent) |
|
short |
getIfAbsentPut(float key,
short value) |
|
short |
getIfAbsentPut(float key,
ShortFunction0 function) |
|
<P> short |
getIfAbsentPutWith(float key,
ShortFunction<? super P> function,
P parameter) |
|
short |
getIfAbsentPutWithKey(float key,
FloatToShortFunction function) |
|
short |
getOrThrow(float key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function) |
|
MutableFloatSet |
keySet() |
|
LazyFloatIterable |
keysView() |
|
RichIterable<FloatShortPair> |
keyValuesView() |
|
static FloatShortHashMap |
newWithKeysValues(float key1,
short value1) |
|
static FloatShortHashMap |
newWithKeysValues(float key1,
short value1,
float key2,
short value2) |
|
static FloatShortHashMap |
newWithKeysValues(float key1,
short value1,
float key2,
short value2,
float key3,
short value3) |
|
static FloatShortHashMap |
newWithKeysValues(float key1,
short value1,
float key2,
short value2,
float key3,
short value3,
float key4,
short value4) |
|
void |
put(float key,
short value) |
|
void |
putAll(FloatShortMap map) |
|
void |
readExternal(ObjectInput in) |
|
FloatShortHashMap |
reject(FloatShortPredicate predicate) |
|
void |
remove(float key) |
|
void |
removeKey(float key) |
|
short |
removeKeyIfAbsent(float key,
short value) |
|
FloatShortHashMap |
select(FloatShortPredicate predicate) |
|
MutableShortIterator |
shortIterator() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
ImmutableFloatShortMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
short |
updateValue(float key,
short initialValueIfAbsent,
ShortToShortFunction function) |
|
void |
updateValues(FloatShortToShortFunction function) |
Updates the values in-place.
|
MutableShortCollection |
values() |
|
FloatShortHashMap |
withKeysValues(float key1,
short value1,
float key2,
short value2) |
|
FloatShortHashMap |
withKeysValues(float key1,
short value1,
float key2,
short value2,
float key3,
short value3) |
|
FloatShortHashMap |
withKeysValues(float key1,
short value1,
float key2,
short value2,
float key3,
short value3,
float key4,
short value4) |
|
FloatShortHashMap |
withKeyValue(float key1,
short value1) |
|
FloatShortHashMap |
withoutAllKeys(FloatIterable keys) |
|
FloatShortHashMap |
withoutKey(float key) |
|
void |
writeExternal(ObjectOutput out) |
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
isEmpty, notEmpty, size
putPair, withAllKeyValues
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
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
public FloatShortHashMap()
public FloatShortHashMap(int initialCapacity)
public FloatShortHashMap(FloatShortMap map)
public static FloatShortHashMap newWithKeysValues(float key1, short value1)
public static FloatShortHashMap newWithKeysValues(float key1, short value1, float key2, short value2)
public static FloatShortHashMap newWithKeysValues(float key1, short value1, float key2, short value2, float key3, short value3)
public static FloatShortHashMap newWithKeysValues(float key1, short value1, float key2, short value2, float key3, short value3, float key4, short value4)
public boolean equals(Object obj)
FloatShortMap
Map.equals(Object)
.equals
in interface FloatShortMap
equals
in class Object
public int hashCode()
FloatShortMap
Map.hashCode()
.hashCode
in interface FloatShortMap
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 FloatShortMap
toString
in interface PrimitiveIterable
toString
in class AbstractShortIterable
AbstractCollection.toString()
public MutableShortIterator shortIterator()
ShortIterable
shortIterator
in interface MutableShortValuesMap
shortIterator
in interface ShortIterable
public <V> V injectInto(V injectedValue, ObjectShortToObjectFunction<? super V,? extends V> function)
injectInto
in interface ShortIterable
public void clear()
clear
in interface MutableFloatKeysMap
clear
in interface MutableShortValuesMap
public void put(float key, short value)
put
in interface MutableFloatShortMap
public void putAll(FloatShortMap map)
putAll
in interface MutableFloatShortMap
public void updateValues(FloatShortToShortFunction function)
MutableFloatShortMap
updateValues
in interface MutableFloatShortMap
function
- that takes a key and its value and that returns a new value for this keypublic void removeKey(float key)
removeKey
in interface MutableFloatKeysMap
removeKey
in interface MutableFloatShortMap
public void remove(float key)
remove
in interface MutableFloatShortMap
public short removeKeyIfAbsent(float key, short value)
removeKeyIfAbsent
in interface MutableFloatShortMap
public short getIfAbsentPut(float key, short value)
getIfAbsentPut
in interface MutableFloatShortMap
public short getIfAbsentPut(float key, ShortFunction0 function)
getIfAbsentPut
in interface MutableFloatShortMap
public <P> short getIfAbsentPutWith(float key, ShortFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableFloatShortMap
public short getIfAbsentPutWithKey(float key, FloatToShortFunction function)
getIfAbsentPutWithKey
in interface MutableFloatShortMap
public short addToValue(float key, short toBeAdded)
addToValue
in interface MutableFloatShortMap
public short updateValue(float key, short initialValueIfAbsent, ShortToShortFunction function)
updateValue
in interface MutableFloatShortMap
public FloatShortHashMap withKeyValue(float key1, short value1)
withKeyValue
in interface MutableFloatShortMap
public FloatShortHashMap withKeysValues(float key1, short value1, float key2, short value2)
public FloatShortHashMap withKeysValues(float key1, short value1, float key2, short value2, float key3, short value3)
public FloatShortHashMap withKeysValues(float key1, short value1, float key2, short value2, float key3, short value3, float key4, short value4)
public FloatShortHashMap withoutKey(float key)
withoutKey
in interface MutableFloatShortMap
public FloatShortHashMap withoutAllKeys(FloatIterable keys)
withoutAllKeys
in interface MutableFloatShortMap
public MutableFloatShortMap asUnmodifiable()
asUnmodifiable
in interface MutableFloatShortMap
public MutableFloatShortMap asSynchronized()
asSynchronized
in interface MutableFloatShortMap
public ImmutableFloatShortMap toImmutable()
toImmutable
in interface FloatShortMap
public short get(float key)
get
in interface FloatShortMap
public short getIfAbsent(float key, short ifAbsent)
getIfAbsent
in interface FloatShortMap
public short getOrThrow(float key)
getOrThrow
in interface FloatShortMap
public boolean containsKey(float key)
containsKey
in interface FloatKeysMap
containsKey
in interface FloatShortMap
public void forEachKey(FloatProcedure procedure)
forEachKey
in interface FloatKeysMap
forEachKey
in interface FloatShortMap
public void forEachKeyValue(FloatShortProcedure procedure)
forEachKeyValue
in interface FloatShortMap
public LazyFloatIterable keysView()
keysView
in interface FloatShortMap
public RichIterable<FloatShortPair> keyValuesView()
keyValuesView
in interface FloatShortMap
public MutableShortFloatMap flipUniqueValues()
FloatShortMap
flipUniqueValues
in interface FloatShortMap
flipUniqueValues
in interface MutableFloatShortMap
public FloatShortHashMap select(FloatShortPredicate predicate)
select
in interface FloatShortMap
select
in interface MutableFloatShortMap
public FloatShortHashMap reject(FloatShortPredicate predicate)
reject
in interface FloatShortMap
reject
in interface MutableFloatShortMap
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 FloatShortMap
public MutableShortCollection values()
values
in interface ShortValuesMap
Copyright © 2004–2019. All rights reserved.