Externalizable
, Serializable
, DoubleIterable
, DoubleValuesMap
, MutableDoubleValuesMap
, MutableShortDoubleMap
, ShortDoubleMap
, PrimitiveIterable
, MutableShortKeysMap
, ShortKeysMap
public class ShortDoubleHashMap extends AbstractMutableDoubleValuesMap implements MutableShortDoubleMap, Externalizable, MutableShortKeysMap
Constructor | Description |
---|---|
ShortDoubleHashMap() |
|
ShortDoubleHashMap(int initialCapacity) |
|
ShortDoubleHashMap(ShortDoubleMap map) |
Modifier and Type | Method | Description |
---|---|---|
double |
addToValue(short key,
double toBeAdded) |
|
MutableShortDoubleMap |
asSynchronized() |
|
MutableShortDoubleMap |
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(short key) |
|
MutableDoubleIterator |
doubleIterator() |
Returns a primitive iterator that can be used to iterate over the DoubleIterable in an
imperative style.
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(ShortProcedure procedure) |
|
void |
forEachKeyValue(ShortDoubleProcedure procedure) |
|
double |
get(short key) |
|
double |
getIfAbsent(short key,
double ifAbsent) |
|
double |
getIfAbsentPut(short key,
double value) |
|
double |
getIfAbsentPut(short key,
DoubleFunction0 function) |
|
<P> double |
getIfAbsentPutWith(short key,
DoubleFunction<? super P> function,
P parameter) |
|
double |
getIfAbsentPutWithKey(short key,
ShortToDoubleFunction function) |
|
double |
getOrThrow(short key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectDoubleToObjectFunction<? super V,? extends V> function) |
|
MutableShortSet |
keySet() |
|
LazyShortIterable |
keysView() |
|
RichIterable<ShortDoublePair> |
keyValuesView() |
|
static ShortDoubleHashMap |
newWithKeysValues(short key1,
double value1) |
|
static ShortDoubleHashMap |
newWithKeysValues(short key1,
double value1,
short key2,
double value2) |
|
static ShortDoubleHashMap |
newWithKeysValues(short key1,
double value1,
short key2,
double value2,
short key3,
double value3) |
|
static ShortDoubleHashMap |
newWithKeysValues(short key1,
double value1,
short key2,
double value2,
short key3,
double value3,
short key4,
double value4) |
|
void |
put(short key,
double value) |
|
void |
putAll(ShortDoubleMap map) |
|
void |
readExternal(ObjectInput in) |
|
ShortDoubleHashMap |
reject(ShortDoublePredicate predicate) |
|
void |
remove(short key) |
|
void |
removeKey(short key) |
|
double |
removeKeyIfAbsent(short key,
double value) |
|
ShortDoubleHashMap |
select(ShortDoublePredicate predicate) |
|
ImmutableShortDoubleMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
double |
updateValue(short key,
double initialValueIfAbsent,
DoubleToDoubleFunction function) |
|
MutableDoubleCollection |
values() |
|
ShortDoubleHashMap |
withKeysValues(short key1,
double value1,
short key2,
double value2) |
|
ShortDoubleHashMap |
withKeysValues(short key1,
double value1,
short key2,
double value2,
short key3,
double value3) |
|
ShortDoubleHashMap |
withKeysValues(short key1,
double value1,
short key2,
double value2,
short key3,
double value3,
short key4,
double value4) |
|
ShortDoubleHashMap |
withKeyValue(short key1,
double value1) |
|
ShortDoubleHashMap |
withoutAllKeys(ShortIterable keys) |
|
ShortDoubleHashMap |
withoutKey(short key) |
|
void |
writeExternal(ObjectOutput out) |
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList
allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArray
allSatisfy, anySatisfy, asLazy, average, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
containsValue, forEachValue
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
isEmpty, notEmpty, size
public ShortDoubleHashMap()
public ShortDoubleHashMap(int initialCapacity)
public ShortDoubleHashMap(ShortDoubleMap map)
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1)
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1, short key2, double value2)
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3)
public static ShortDoubleHashMap newWithKeysValues(short key1, double value1, short key2, double value2, short key3, double value3, short key4, double value4)
public boolean equals(Object obj)
ShortDoubleMap
Map.equals(Object)
.equals
in interface ShortDoubleMap
equals
in class Object
public int hashCode()
ShortDoubleMap
Map.hashCode()
.hashCode
in interface ShortDoubleMap
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 PrimitiveIterable
toString
in interface ShortDoubleMap
toString
in class AbstractDoubleIterable
AbstractCollection.toString()
public MutableDoubleIterator doubleIterator()
DoubleIterable
doubleIterator
in interface DoubleIterable
doubleIterator
in interface MutableDoubleValuesMap
public <V> V injectInto(V injectedValue, ObjectDoubleToObjectFunction<? super V,? extends V> function)
injectInto
in interface DoubleIterable
public void clear()
clear
in interface MutableDoubleValuesMap
clear
in interface MutableShortKeysMap
public void put(short key, double value)
put
in interface MutableShortDoubleMap
public void putAll(ShortDoubleMap map)
putAll
in interface MutableShortDoubleMap
public void removeKey(short key)
removeKey
in interface MutableShortDoubleMap
removeKey
in interface MutableShortKeysMap
public void remove(short key)
remove
in interface MutableShortDoubleMap
public double removeKeyIfAbsent(short key, double value)
removeKeyIfAbsent
in interface MutableShortDoubleMap
public double getIfAbsentPut(short key, double value)
getIfAbsentPut
in interface MutableShortDoubleMap
public double getIfAbsentPut(short key, DoubleFunction0 function)
getIfAbsentPut
in interface MutableShortDoubleMap
public <P> double getIfAbsentPutWith(short key, DoubleFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableShortDoubleMap
public double getIfAbsentPutWithKey(short key, ShortToDoubleFunction function)
getIfAbsentPutWithKey
in interface MutableShortDoubleMap
public double addToValue(short key, double toBeAdded)
addToValue
in interface MutableShortDoubleMap
public double updateValue(short key, double initialValueIfAbsent, DoubleToDoubleFunction function)
updateValue
in interface MutableShortDoubleMap
public ShortDoubleHashMap withKeyValue(short key1, double value1)
withKeyValue
in interface MutableShortDoubleMap
public ShortDoubleHashMap withKeysValues(short key1, double value1, short key2, double value2)
public ShortDoubleHashMap withKeysValues(short key1, double value1, short key2, double value2, short key3, double value3)
public ShortDoubleHashMap withKeysValues(short key1, double value1, short key2, double value2, short key3, double value3, short key4, double value4)
public ShortDoubleHashMap withoutKey(short key)
withoutKey
in interface MutableShortDoubleMap
public ShortDoubleHashMap withoutAllKeys(ShortIterable keys)
withoutAllKeys
in interface MutableShortDoubleMap
public MutableShortDoubleMap asUnmodifiable()
asUnmodifiable
in interface MutableShortDoubleMap
public MutableShortDoubleMap asSynchronized()
asSynchronized
in interface MutableShortDoubleMap
public ImmutableShortDoubleMap toImmutable()
toImmutable
in interface ShortDoubleMap
public double get(short key)
get
in interface ShortDoubleMap
public double getIfAbsent(short key, double ifAbsent)
getIfAbsent
in interface ShortDoubleMap
public double getOrThrow(short key)
getOrThrow
in interface ShortDoubleMap
public boolean containsKey(short key)
containsKey
in interface ShortDoubleMap
containsKey
in interface ShortKeysMap
public void forEachKey(ShortProcedure procedure)
forEachKey
in interface ShortDoubleMap
forEachKey
in interface ShortKeysMap
public void forEachKeyValue(ShortDoubleProcedure procedure)
forEachKeyValue
in interface ShortDoubleMap
public LazyShortIterable keysView()
keysView
in interface ShortDoubleMap
public RichIterable<ShortDoublePair> keyValuesView()
keyValuesView
in interface ShortDoubleMap
public ShortDoubleHashMap select(ShortDoublePredicate predicate)
select
in interface MutableShortDoubleMap
select
in interface ShortDoubleMap
public ShortDoubleHashMap reject(ShortDoublePredicate predicate)
reject
in interface MutableShortDoubleMap
reject
in interface ShortDoubleMap
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 MutableShortSet keySet()
keySet
in interface ShortDoubleMap
public MutableDoubleCollection values()
values
in interface DoubleValuesMap
Copyright © 2004–2017. All rights reserved.