Externalizable
, Serializable
, DoubleShortMap
, MutableDoubleShortMap
, MutableShortValuesMap
, ShortValuesMap
, PrimitiveIterable
, ShortIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleShortHashMap extends AbstractMutableShortValuesMap implements MutableDoubleShortMap, Externalizable, MutableDoubleKeysMap
Constructor | Description |
---|---|
DoubleShortHashMap() |
|
DoubleShortHashMap(int initialCapacity) |
|
DoubleShortHashMap(DoubleShortMap map) |
Modifier and Type | Method | Description |
---|---|---|
short |
addToValue(double key,
short toBeAdded) |
|
MutableDoubleShortMap |
asSynchronized() |
|
MutableDoubleShortMap |
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(double key) |
|
boolean |
equals(Object obj) |
Follows the same general contract as
Map.equals(Object) . |
void |
forEachKey(DoubleProcedure procedure) |
|
void |
forEachKeyValue(DoubleShortProcedure procedure) |
|
short |
get(double key) |
|
short |
getIfAbsent(double key,
short ifAbsent) |
|
short |
getIfAbsentPut(double key,
short value) |
|
short |
getIfAbsentPut(double key,
ShortFunction0 function) |
|
<P> short |
getIfAbsentPutWith(double key,
ShortFunction<? super P> function,
P parameter) |
|
short |
getIfAbsentPutWithKey(double key,
DoubleToShortFunction function) |
|
short |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function) |
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleShortPair> |
keyValuesView() |
|
static DoubleShortHashMap |
newWithKeysValues(double key1,
short value1) |
|
static DoubleShortHashMap |
newWithKeysValues(double key1,
short value1,
double key2,
short value2) |
|
static DoubleShortHashMap |
newWithKeysValues(double key1,
short value1,
double key2,
short value2,
double key3,
short value3) |
|
static DoubleShortHashMap |
newWithKeysValues(double key1,
short value1,
double key2,
short value2,
double key3,
short value3,
double key4,
short value4) |
|
void |
put(double key,
short value) |
|
void |
putAll(DoubleShortMap map) |
|
void |
readExternal(ObjectInput in) |
|
DoubleShortHashMap |
reject(DoubleShortPredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
short |
removeKeyIfAbsent(double key,
short value) |
|
DoubleShortHashMap |
select(DoubleShortPredicate predicate) |
|
MutableShortIterator |
shortIterator() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
ImmutableDoubleShortMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
short |
updateValue(double key,
short initialValueIfAbsent,
ShortToShortFunction function) |
|
MutableShortCollection |
values() |
|
DoubleShortHashMap |
withKeysValues(double key1,
short value1,
double key2,
short value2) |
|
DoubleShortHashMap |
withKeysValues(double key1,
short value1,
double key2,
short value2,
double key3,
short value3) |
|
DoubleShortHashMap |
withKeysValues(double key1,
short value1,
double key2,
short value2,
double key3,
short value3,
double key4,
short value4) |
|
DoubleShortHashMap |
withKeyValue(double key1,
short value1) |
|
DoubleShortHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleShortHashMap |
withoutKey(double key) |
|
void |
writeExternal(ObjectOutput out) |
allSatisfy, anySatisfy, appendString, 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
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
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
public DoubleShortHashMap()
public DoubleShortHashMap(int initialCapacity)
public DoubleShortHashMap(DoubleShortMap map)
public static DoubleShortHashMap newWithKeysValues(double key1, short value1)
public static DoubleShortHashMap newWithKeysValues(double key1, short value1, double key2, short value2)
public static DoubleShortHashMap newWithKeysValues(double key1, short value1, double key2, short value2, double key3, short value3)
public static DoubleShortHashMap newWithKeysValues(double key1, short value1, double key2, short value2, double key3, short value3, double key4, short value4)
public boolean equals(Object obj)
DoubleShortMap
Map.equals(Object)
.equals
in interface DoubleShortMap
equals
in class Object
public int hashCode()
DoubleShortMap
Map.hashCode()
.hashCode
in interface DoubleShortMap
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 DoubleShortMap
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 MutableDoubleKeysMap
clear
in interface MutableShortValuesMap
public void put(double key, short value)
put
in interface MutableDoubleShortMap
public void putAll(DoubleShortMap map)
putAll
in interface MutableDoubleShortMap
public void removeKey(double key)
removeKey
in interface MutableDoubleKeysMap
removeKey
in interface MutableDoubleShortMap
public void remove(double key)
remove
in interface MutableDoubleShortMap
public short removeKeyIfAbsent(double key, short value)
removeKeyIfAbsent
in interface MutableDoubleShortMap
public short getIfAbsentPut(double key, short value)
getIfAbsentPut
in interface MutableDoubleShortMap
public short getIfAbsentPut(double key, ShortFunction0 function)
getIfAbsentPut
in interface MutableDoubleShortMap
public <P> short getIfAbsentPutWith(double key, ShortFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleShortMap
public short getIfAbsentPutWithKey(double key, DoubleToShortFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleShortMap
public short addToValue(double key, short toBeAdded)
addToValue
in interface MutableDoubleShortMap
public short updateValue(double key, short initialValueIfAbsent, ShortToShortFunction function)
updateValue
in interface MutableDoubleShortMap
public DoubleShortHashMap withKeyValue(double key1, short value1)
withKeyValue
in interface MutableDoubleShortMap
public DoubleShortHashMap withKeysValues(double key1, short value1, double key2, short value2)
public DoubleShortHashMap withKeysValues(double key1, short value1, double key2, short value2, double key3, short value3)
public DoubleShortHashMap withKeysValues(double key1, short value1, double key2, short value2, double key3, short value3, double key4, short value4)
public DoubleShortHashMap withoutKey(double key)
withoutKey
in interface MutableDoubleShortMap
public DoubleShortHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleShortMap
public MutableDoubleShortMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleShortMap
public MutableDoubleShortMap asSynchronized()
asSynchronized
in interface MutableDoubleShortMap
public ImmutableDoubleShortMap toImmutable()
toImmutable
in interface DoubleShortMap
public short get(double key)
get
in interface DoubleShortMap
public short getIfAbsent(double key, short ifAbsent)
getIfAbsent
in interface DoubleShortMap
public short getOrThrow(double key)
getOrThrow
in interface DoubleShortMap
public boolean containsKey(double key)
containsKey
in interface DoubleKeysMap
containsKey
in interface DoubleShortMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleKeysMap
forEachKey
in interface DoubleShortMap
public void forEachKeyValue(DoubleShortProcedure procedure)
forEachKeyValue
in interface DoubleShortMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleShortMap
public RichIterable<DoubleShortPair> keyValuesView()
keyValuesView
in interface DoubleShortMap
public DoubleShortHashMap select(DoubleShortPredicate predicate)
select
in interface DoubleShortMap
select
in interface MutableDoubleShortMap
public DoubleShortHashMap reject(DoubleShortPredicate predicate)
reject
in interface DoubleShortMap
reject
in interface MutableDoubleShortMap
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 MutableDoubleSet keySet()
keySet
in interface DoubleShortMap
public MutableShortCollection values()
values
in interface ShortValuesMap
Copyright © 2004–2017. All rights reserved.