public class ShortDoubleHashMap extends AbstractMutableDoubleValuesMap implements com.gs.collections.api.map.primitive.MutableShortDoubleMap, java.io.Externalizable, MutableShortKeysMap
AbstractMutableDoubleValuesMap.AbstractDoubleValuesCollection, AbstractMutableDoubleValuesMap.SentinelValues| Constructor and Description |
|---|
ShortDoubleHashMap() |
ShortDoubleHashMap(int initialCapacity) |
ShortDoubleHashMap(com.gs.collections.api.map.primitive.ShortDoubleMap map) |
| Modifier and Type | Method and Description |
|---|---|
double |
addToValue(short key,
double toBeAdded) |
com.gs.collections.api.map.primitive.MutableShortDoubleMap |
asSynchronized() |
com.gs.collections.api.map.primitive.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) |
com.gs.collections.api.iterator.MutableDoubleIterator |
doubleIterator() |
boolean |
equals(java.lang.Object obj)
Follows the same general contract as
Map.equals(Object). |
void |
forEachKey(com.gs.collections.api.block.procedure.primitive.ShortProcedure procedure) |
void |
forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ShortDoubleProcedure procedure) |
double |
get(short key) |
protected double |
getEmptyValue() |
double |
getIfAbsent(short key,
double ifAbsent) |
double |
getIfAbsentPut(short key,
double value) |
double |
getIfAbsentPut(short key,
com.gs.collections.api.block.function.primitive.DoubleFunction0 function) |
<P> double |
getIfAbsentPutWith(short key,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super P> function,
P parameter) |
double |
getIfAbsentPutWithKey(short key,
com.gs.collections.api.block.function.primitive.ShortToDoubleFunction function) |
protected int |
getOccupiedWithData() |
double |
getOrThrow(short key) |
protected AbstractMutableDoubleValuesMap.SentinelValues |
getSentinelValues() |
protected int |
getTableSize() |
protected double |
getValueAtIndex(int index) |
int |
hashCode()
Follows the same general contract as
Map.hashCode(). |
<V> V |
injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleToObjectFunction<? super V,? extends V> function) |
protected boolean |
isNonSentinelAtIndex(int index) |
com.gs.collections.api.set.primitive.MutableShortSet |
keySet() |
com.gs.collections.api.LazyShortIterable |
keysView() |
com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.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(com.gs.collections.api.map.primitive.ShortDoubleMap map) |
void |
readExternal(java.io.ObjectInput in) |
ShortDoubleHashMap |
reject(com.gs.collections.api.block.predicate.primitive.ShortDoublePredicate predicate) |
void |
remove(short key) |
void |
removeKey(short key) |
double |
removeKeyIfAbsent(short key,
double value) |
ShortDoubleHashMap |
select(com.gs.collections.api.block.predicate.primitive.ShortDoublePredicate predicate) |
protected void |
setSentinelValuesNull() |
com.gs.collections.api.map.primitive.ImmutableShortDoubleMap |
toImmutable() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
double |
updateValue(short key,
double initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.DoubleToDoubleFunction function) |
com.gs.collections.api.collection.primitive.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(com.gs.collections.api.ShortIterable keys) |
ShortDoubleHashMap |
withoutKey(short key) |
void |
writeExternal(java.io.ObjectOutput out) |
addEmptyKeyValue, addRemovedKeyValue, allSatisfy, anySatisfy, appendString, collect, contains, containsAll, containsValue, count, detectIfNone, each, forEach, forEachValue, isEmpty, max, min, noneSatisfy, notEmpty, reject, removeEmptyKey, removeRemovedKey, select, size, sum, toArrayappendString, appendString, asLazy, average, containsAll, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedListclone, finalize, getClass, notify, notifyAll, wait, wait, waitcollect, reject, selectcontainsValue, forEachValueallSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeisEmpty, notEmpty, sizepublic ShortDoubleHashMap()
public ShortDoubleHashMap(int initialCapacity)
public ShortDoubleHashMap(com.gs.collections.api.map.primitive.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)
protected int getOccupiedWithData()
getOccupiedWithData in class AbstractMutableDoubleValuesMapprotected AbstractMutableDoubleValuesMap.SentinelValues getSentinelValues()
getSentinelValues in class AbstractMutableDoubleValuesMapprotected void setSentinelValuesNull()
setSentinelValuesNull in class AbstractMutableDoubleValuesMapprotected double getEmptyValue()
getEmptyValue in class AbstractMutableDoubleValuesMapprotected int getTableSize()
getTableSize in class AbstractMutableDoubleValuesMapprotected double getValueAtIndex(int index)
getValueAtIndex in class AbstractMutableDoubleValuesMappublic boolean equals(java.lang.Object obj)
com.gs.collections.api.map.primitive.ShortDoubleMapMap.equals(Object).equals in interface com.gs.collections.api.map.primitive.ShortDoubleMapequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.map.primitive.ShortDoubleMapMap.hashCode().hashCode in interface com.gs.collections.api.map.primitive.ShortDoubleMaphashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.map.primitive.ShortDoubleMaptoString in interface com.gs.collections.api.PrimitiveIterabletoString in class AbstractDoubleIterablepublic com.gs.collections.api.iterator.MutableDoubleIterator doubleIterator()
doubleIterator in interface com.gs.collections.api.DoubleIterabledoubleIterator in interface com.gs.collections.api.map.primitive.MutableDoubleValuesMappublic <V> V injectInto(V injectedValue,
com.gs.collections.api.block.function.primitive.ObjectDoubleToObjectFunction<? super V,? extends V> function)
injectInto in interface com.gs.collections.api.DoubleIterablepublic void clear()
clear in interface com.gs.collections.api.map.primitive.MutableDoubleValuesMapclear in interface MutableShortKeysMappublic void put(short key,
double value)
put in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic void putAll(com.gs.collections.api.map.primitive.ShortDoubleMap map)
putAll in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic void removeKey(short key)
removeKey in interface com.gs.collections.api.map.primitive.MutableShortDoubleMapremoveKey in interface MutableShortKeysMappublic void remove(short key)
remove in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic double removeKeyIfAbsent(short key,
double value)
removeKeyIfAbsent in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic double getIfAbsentPut(short key,
double value)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic double getIfAbsentPut(short key,
com.gs.collections.api.block.function.primitive.DoubleFunction0 function)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic <P> double getIfAbsentPutWith(short key,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic double getIfAbsentPutWithKey(short key,
com.gs.collections.api.block.function.primitive.ShortToDoubleFunction function)
getIfAbsentPutWithKey in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic double addToValue(short key,
double toBeAdded)
addToValue in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic double updateValue(short key,
double initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.DoubleToDoubleFunction function)
updateValue in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic ShortDoubleHashMap withKeyValue(short key1, double value1)
withKeyValue in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic 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 com.gs.collections.api.map.primitive.MutableShortDoubleMappublic ShortDoubleHashMap withoutAllKeys(com.gs.collections.api.ShortIterable keys)
withoutAllKeys in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic com.gs.collections.api.map.primitive.MutableShortDoubleMap asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic com.gs.collections.api.map.primitive.MutableShortDoubleMap asSynchronized()
asSynchronized in interface com.gs.collections.api.map.primitive.MutableShortDoubleMappublic com.gs.collections.api.map.primitive.ImmutableShortDoubleMap toImmutable()
toImmutable in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic double get(short key)
get in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic double getIfAbsent(short key,
double ifAbsent)
getIfAbsent in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic double getOrThrow(short key)
getOrThrow in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic boolean containsKey(short key)
containsKey in interface com.gs.collections.api.map.primitive.ShortDoubleMapcontainsKey in interface ShortKeysMappublic void forEachKey(com.gs.collections.api.block.procedure.primitive.ShortProcedure procedure)
forEachKey in interface com.gs.collections.api.map.primitive.ShortDoubleMapforEachKey in interface ShortKeysMappublic void forEachKeyValue(com.gs.collections.api.block.procedure.primitive.ShortDoubleProcedure procedure)
forEachKeyValue in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic com.gs.collections.api.LazyShortIterable keysView()
keysView in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.ShortDoublePair> keyValuesView()
keyValuesView in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic ShortDoubleHashMap select(com.gs.collections.api.block.predicate.primitive.ShortDoublePredicate predicate)
select in interface com.gs.collections.api.map.primitive.MutableShortDoubleMapselect in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic ShortDoubleHashMap reject(com.gs.collections.api.block.predicate.primitive.ShortDoublePredicate predicate)
reject in interface com.gs.collections.api.map.primitive.MutableShortDoubleMapreject in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic 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()
protected boolean isNonSentinelAtIndex(int index)
isNonSentinelAtIndex in class AbstractMutableDoubleValuesMappublic com.gs.collections.api.set.primitive.MutableShortSet keySet()
keySet in interface com.gs.collections.api.map.primitive.ShortDoubleMappublic com.gs.collections.api.collection.primitive.MutableDoubleCollection values()
values in interface com.gs.collections.api.map.primitive.DoubleValuesMap