java.io.Externalizable, java.io.Serializable, DoubleShortMap, MutableDoubleShortMap, MutableShortValuesMap, ShortValuesMap, PrimitiveIterable, ShortIterable, MutableDoubleKeysMap, DoubleKeysMappublic class DoubleShortHashMap extends AbstractMutableShortValuesMap implements MutableDoubleShortMap, java.io.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(java.lang.Object obj) |
Follows the same general contract as
Map.equals(Object). |
MutableShortDoubleMap |
flipUniqueValues() |
Return the ShortDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
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(java.io.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() |
|
java.lang.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) |
|
void |
updateValues(DoubleShortToShortFunction function) |
Updates the values in-place.
|
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(java.io.ObjectOutput out) |
allSatisfy, anySatisfy, appendString, chunk, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, select, size, sum, toArrayasLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListisEmpty, notEmpty, sizeputPair, withAllKeyValuescollect, reject, selectappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeallSatisfy, 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, toSortedListcontainsValue, forEachValue, tappublic 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(java.lang.Object obj)
DoubleShortMapMap.equals(Object).equals in interface DoubleShortMapequals in class java.lang.Objectpublic int hashCode()
DoubleShortMapMap.hashCode().hashCode in interface DoubleShortMaphashCode in class java.lang.Objectpublic 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 DoubleShortMaptoString in interface PrimitiveIterabletoString in class AbstractShortIterableAbstractCollection.toString()public MutableShortIterator shortIterator()
ShortIterableshortIterator in interface MutableShortValuesMapshortIterator in interface ShortIterablepublic <V> V injectInto(V injectedValue,
ObjectShortToObjectFunction<? super V,? extends V> function)
injectInto in interface ShortIterablepublic void clear()
clear in interface MutableDoubleKeysMapclear in interface MutableShortValuesMappublic void put(double key,
short value)
put in interface MutableDoubleShortMappublic void putAll(DoubleShortMap map)
putAll in interface MutableDoubleShortMappublic void updateValues(DoubleShortToShortFunction function)
MutableDoubleShortMapupdateValues in interface MutableDoubleShortMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(double key)
removeKey in interface MutableDoubleKeysMapremoveKey in interface MutableDoubleShortMappublic void remove(double key)
remove in interface MutableDoubleShortMappublic short removeKeyIfAbsent(double key,
short value)
removeKeyIfAbsent in interface MutableDoubleShortMappublic short getIfAbsentPut(double key,
short value)
getIfAbsentPut in interface MutableDoubleShortMappublic short getIfAbsentPut(double key,
ShortFunction0 function)
getIfAbsentPut in interface MutableDoubleShortMappublic <P> short getIfAbsentPutWith(double key,
ShortFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableDoubleShortMappublic short getIfAbsentPutWithKey(double key,
DoubleToShortFunction function)
getIfAbsentPutWithKey in interface MutableDoubleShortMappublic short addToValue(double key,
short toBeAdded)
addToValue in interface MutableDoubleShortMappublic short updateValue(double key,
short initialValueIfAbsent,
ShortToShortFunction function)
updateValue in interface MutableDoubleShortMappublic DoubleShortHashMap withKeyValue(double key1, short value1)
withKeyValue in interface MutableDoubleShortMappublic 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 MutableDoubleShortMappublic DoubleShortHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys in interface MutableDoubleShortMappublic MutableDoubleShortMap asUnmodifiable()
asUnmodifiable in interface MutableDoubleShortMappublic MutableDoubleShortMap asSynchronized()
asSynchronized in interface MutableDoubleShortMappublic ImmutableDoubleShortMap toImmutable()
toImmutable in interface DoubleShortMappublic short get(double key)
get in interface DoubleShortMappublic short getIfAbsent(double key,
short ifAbsent)
getIfAbsent in interface DoubleShortMappublic short getOrThrow(double key)
getOrThrow in interface DoubleShortMappublic boolean containsKey(double key)
containsKey in interface DoubleKeysMapcontainsKey in interface DoubleShortMappublic void forEachKey(DoubleProcedure procedure)
forEachKey in interface DoubleKeysMapforEachKey in interface DoubleShortMappublic void forEachKeyValue(DoubleShortProcedure procedure)
forEachKeyValue in interface DoubleShortMappublic LazyDoubleIterable keysView()
keysView in interface DoubleShortMappublic RichIterable<DoubleShortPair> keyValuesView()
keyValuesView in interface DoubleShortMappublic MutableShortDoubleMap flipUniqueValues()
DoubleShortMapflipUniqueValues in interface DoubleShortMapflipUniqueValues in interface MutableDoubleShortMappublic DoubleShortHashMap select(DoubleShortPredicate predicate)
select in interface DoubleShortMapselect in interface MutableDoubleShortMappublic DoubleShortHashMap reject(DoubleShortPredicate predicate)
reject in interface DoubleShortMapreject in interface MutableDoubleShortMappublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void compact()
public MutableDoubleSet keySet()
keySet in interface DoubleShortMappublic MutableShortCollection values()
values in interface ShortValuesMapCopyright © 2004–2020. All rights reserved.