public class IntDoubleHashMap extends AbstractMutableDoubleValuesMap implements com.gs.collections.api.map.primitive.MutableIntDoubleMap, java.io.Externalizable, MutableIntKeysMap
AbstractMutableDoubleValuesMap.AbstractDoubleValuesCollection, AbstractMutableDoubleValuesMap.SentinelValues| Constructor and Description |
|---|
IntDoubleHashMap() |
IntDoubleHashMap(int initialCapacity) |
IntDoubleHashMap(com.gs.collections.api.map.primitive.IntDoubleMap map) |
| Modifier and Type | Method and Description |
|---|---|
double |
addToValue(int key,
double toBeAdded) |
com.gs.collections.api.map.primitive.MutableIntDoubleMap |
asSynchronized() |
com.gs.collections.api.map.primitive.MutableIntDoubleMap |
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(int 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.IntProcedure procedure) |
void |
forEachKeyValue(com.gs.collections.api.block.procedure.primitive.IntDoubleProcedure procedure) |
double |
get(int key) |
protected double |
getEmptyValue() |
double |
getIfAbsent(int key,
double ifAbsent) |
double |
getIfAbsentPut(int key,
double value) |
double |
getIfAbsentPut(int key,
com.gs.collections.api.block.function.primitive.DoubleFunction0 function) |
<P> double |
getIfAbsentPutWith(int key,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super P> function,
P parameter) |
double |
getIfAbsentPutWithKey(int key,
com.gs.collections.api.block.function.primitive.IntToDoubleFunction function) |
protected int |
getOccupiedWithData() |
double |
getOrThrow(int 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.MutableIntSet |
keySet() |
com.gs.collections.api.LazyIntIterable |
keysView() |
com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.IntDoublePair> |
keyValuesView() |
static IntDoubleHashMap |
newWithKeysValues(int key1,
double value1) |
static IntDoubleHashMap |
newWithKeysValues(int key1,
double value1,
int key2,
double value2) |
static IntDoubleHashMap |
newWithKeysValues(int key1,
double value1,
int key2,
double value2,
int key3,
double value3) |
static IntDoubleHashMap |
newWithKeysValues(int key1,
double value1,
int key2,
double value2,
int key3,
double value3,
int key4,
double value4) |
void |
put(int key,
double value) |
void |
putAll(com.gs.collections.api.map.primitive.IntDoubleMap map) |
void |
readExternal(java.io.ObjectInput in) |
IntDoubleHashMap |
reject(com.gs.collections.api.block.predicate.primitive.IntDoublePredicate predicate) |
void |
remove(int key) |
void |
removeKey(int key) |
double |
removeKeyIfAbsent(int key,
double value) |
IntDoubleHashMap |
select(com.gs.collections.api.block.predicate.primitive.IntDoublePredicate predicate) |
protected void |
setSentinelValuesNull() |
com.gs.collections.api.map.primitive.ImmutableIntDoubleMap |
toImmutable() |
java.lang.String |
toString()
Returns a string representation of this PrimitiveIterable.
|
double |
updateValue(int key,
double initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.DoubleToDoubleFunction function) |
com.gs.collections.api.collection.primitive.MutableDoubleCollection |
values() |
IntDoubleHashMap |
withKeysValues(int key1,
double value1,
int key2,
double value2) |
IntDoubleHashMap |
withKeysValues(int key1,
double value1,
int key2,
double value2,
int key3,
double value3) |
IntDoubleHashMap |
withKeysValues(int key1,
double value1,
int key2,
double value2,
int key3,
double value3,
int key4,
double value4) |
IntDoubleHashMap |
withKeyValue(int key1,
double value1) |
IntDoubleHashMap |
withoutAllKeys(com.gs.collections.api.IntIterable keys) |
IntDoubleHashMap |
withoutKey(int 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 IntDoubleHashMap()
public IntDoubleHashMap(int initialCapacity)
public IntDoubleHashMap(com.gs.collections.api.map.primitive.IntDoubleMap map)
public static IntDoubleHashMap newWithKeysValues(int key1, double value1)
public static IntDoubleHashMap newWithKeysValues(int key1, double value1, int key2, double value2)
public static IntDoubleHashMap newWithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3)
public static IntDoubleHashMap newWithKeysValues(int key1, double value1, int key2, double value2, int key3, double value3, int 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.IntDoubleMapMap.equals(Object).equals in interface com.gs.collections.api.map.primitive.IntDoubleMapequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.map.primitive.IntDoubleMapMap.hashCode().hashCode in interface com.gs.collections.api.map.primitive.IntDoubleMaphashCode in class java.lang.Objectpublic java.lang.String toString()
com.gs.collections.api.PrimitiveIterabletoString in interface com.gs.collections.api.map.primitive.IntDoubleMaptoString 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 MutableIntKeysMappublic void put(int key,
double value)
put in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic void putAll(com.gs.collections.api.map.primitive.IntDoubleMap map)
putAll in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic void removeKey(int key)
removeKey in interface com.gs.collections.api.map.primitive.MutableIntDoubleMapremoveKey in interface MutableIntKeysMappublic void remove(int key)
remove in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic double removeKeyIfAbsent(int key,
double value)
removeKeyIfAbsent in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic double getIfAbsentPut(int key,
double value)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic double getIfAbsentPut(int key,
com.gs.collections.api.block.function.primitive.DoubleFunction0 function)
getIfAbsentPut in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic <P> double getIfAbsentPutWith(int key,
com.gs.collections.api.block.function.primitive.DoubleFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic double getIfAbsentPutWithKey(int key,
com.gs.collections.api.block.function.primitive.IntToDoubleFunction function)
getIfAbsentPutWithKey in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic double addToValue(int key,
double toBeAdded)
addToValue in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic double updateValue(int key,
double initialValueIfAbsent,
com.gs.collections.api.block.function.primitive.DoubleToDoubleFunction function)
updateValue in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic IntDoubleHashMap withKeyValue(int key1, double value1)
withKeyValue in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic IntDoubleHashMap withKeysValues(int key1, double value1, int key2, double value2)
public IntDoubleHashMap withKeysValues(int key1, double value1, int key2, double value2, int key3, double value3)
public IntDoubleHashMap withKeysValues(int key1, double value1, int key2, double value2, int key3, double value3, int key4, double value4)
public IntDoubleHashMap withoutKey(int key)
withoutKey in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic IntDoubleHashMap withoutAllKeys(com.gs.collections.api.IntIterable keys)
withoutAllKeys in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic com.gs.collections.api.map.primitive.MutableIntDoubleMap asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic com.gs.collections.api.map.primitive.MutableIntDoubleMap asSynchronized()
asSynchronized in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic com.gs.collections.api.map.primitive.ImmutableIntDoubleMap toImmutable()
toImmutable in interface com.gs.collections.api.map.primitive.IntDoubleMappublic double get(int key)
get in interface com.gs.collections.api.map.primitive.IntDoubleMappublic double getIfAbsent(int key,
double ifAbsent)
getIfAbsent in interface com.gs.collections.api.map.primitive.IntDoubleMappublic double getOrThrow(int key)
getOrThrow in interface com.gs.collections.api.map.primitive.IntDoubleMappublic boolean containsKey(int key)
containsKey in interface com.gs.collections.api.map.primitive.IntDoubleMapcontainsKey in interface IntKeysMappublic void forEachKey(com.gs.collections.api.block.procedure.primitive.IntProcedure procedure)
forEachKey in interface com.gs.collections.api.map.primitive.IntDoubleMapforEachKey in interface IntKeysMappublic void forEachKeyValue(com.gs.collections.api.block.procedure.primitive.IntDoubleProcedure procedure)
forEachKeyValue in interface com.gs.collections.api.map.primitive.IntDoubleMappublic com.gs.collections.api.LazyIntIterable keysView()
keysView in interface com.gs.collections.api.map.primitive.IntDoubleMappublic com.gs.collections.api.RichIterable<com.gs.collections.api.tuple.primitive.IntDoublePair> keyValuesView()
keyValuesView in interface com.gs.collections.api.map.primitive.IntDoubleMappublic IntDoubleHashMap select(com.gs.collections.api.block.predicate.primitive.IntDoublePredicate predicate)
select in interface com.gs.collections.api.map.primitive.IntDoubleMapselect in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic IntDoubleHashMap reject(com.gs.collections.api.block.predicate.primitive.IntDoublePredicate predicate)
reject in interface com.gs.collections.api.map.primitive.IntDoubleMapreject in interface com.gs.collections.api.map.primitive.MutableIntDoubleMappublic 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.MutableIntSet keySet()
keySet in interface com.gs.collections.api.map.primitive.IntDoubleMappublic com.gs.collections.api.collection.primitive.MutableDoubleCollection values()
values in interface com.gs.collections.api.map.primitive.DoubleValuesMap