Externalizable
, Serializable
, LongIterable
, DoubleLongMap
, LongValuesMap
, MutableDoubleLongMap
, MutableLongValuesMap
, PrimitiveIterable
, MutableDoubleKeysMap
, DoubleKeysMap
public class DoubleLongHashMap extends AbstractMutableLongValuesMap implements MutableDoubleLongMap, Externalizable, MutableDoubleKeysMap
Constructor | Description |
---|---|
DoubleLongHashMap() |
|
DoubleLongHashMap(int initialCapacity) |
|
DoubleLongHashMap(DoubleLongMap map) |
Modifier and Type | Method | Description |
---|---|---|
long |
addToValue(double key,
long toBeAdded) |
|
MutableDoubleLongMap |
asSynchronized() |
|
MutableDoubleLongMap |
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(DoubleLongProcedure procedure) |
|
long |
get(double key) |
|
long |
getIfAbsent(double key,
long ifAbsent) |
|
long |
getIfAbsentPut(double key,
long value) |
|
long |
getIfAbsentPut(double key,
LongFunction0 function) |
|
<P> long |
getIfAbsentPutWith(double key,
LongFunction<? super P> function,
P parameter) |
|
long |
getIfAbsentPutWithKey(double key,
DoubleToLongFunction function) |
|
long |
getOrThrow(double key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode() . |
<V> V |
injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function) |
|
MutableDoubleSet |
keySet() |
|
LazyDoubleIterable |
keysView() |
|
RichIterable<DoubleLongPair> |
keyValuesView() |
|
MutableLongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
static DoubleLongHashMap |
newWithKeysValues(double key1,
long value1) |
|
static DoubleLongHashMap |
newWithKeysValues(double key1,
long value1,
double key2,
long value2) |
|
static DoubleLongHashMap |
newWithKeysValues(double key1,
long value1,
double key2,
long value2,
double key3,
long value3) |
|
static DoubleLongHashMap |
newWithKeysValues(double key1,
long value1,
double key2,
long value2,
double key3,
long value3,
double key4,
long value4) |
|
void |
put(double key,
long value) |
|
void |
putAll(DoubleLongMap map) |
|
void |
readExternal(ObjectInput in) |
|
DoubleLongHashMap |
reject(DoubleLongPredicate predicate) |
|
void |
remove(double key) |
|
void |
removeKey(double key) |
|
long |
removeKeyIfAbsent(double key,
long value) |
|
DoubleLongHashMap |
select(DoubleLongPredicate predicate) |
|
ImmutableDoubleLongMap |
toImmutable() |
|
String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
long |
updateValue(double key,
long initialValueIfAbsent,
LongToLongFunction function) |
|
MutableLongCollection |
values() |
|
DoubleLongHashMap |
withKeysValues(double key1,
long value1,
double key2,
long value2) |
|
DoubleLongHashMap |
withKeysValues(double key1,
long value1,
double key2,
long value2,
double key3,
long value3) |
|
DoubleLongHashMap |
withKeysValues(double key1,
long value1,
double key2,
long value2,
double key3,
long value3,
double key4,
long value4) |
|
DoubleLongHashMap |
withKeyValue(double key1,
long value1) |
|
DoubleLongHashMap |
withoutAllKeys(DoubleIterable keys) |
|
DoubleLongHashMap |
withoutKey(double 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
isEmpty, 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
collect, reject, select
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
public DoubleLongHashMap()
public DoubleLongHashMap(int initialCapacity)
public DoubleLongHashMap(DoubleLongMap map)
public static DoubleLongHashMap newWithKeysValues(double key1, long value1)
public static DoubleLongHashMap newWithKeysValues(double key1, long value1, double key2, long value2)
public static DoubleLongHashMap newWithKeysValues(double key1, long value1, double key2, long value2, double key3, long value3)
public static DoubleLongHashMap newWithKeysValues(double key1, long value1, double key2, long value2, double key3, long value3, double key4, long value4)
public boolean equals(Object obj)
DoubleLongMap
Map.equals(Object)
.equals
in interface DoubleLongMap
equals
in class Object
public int hashCode()
DoubleLongMap
Map.hashCode()
.hashCode
in interface DoubleLongMap
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 DoubleLongMap
toString
in interface PrimitiveIterable
toString
in class AbstractLongIterable
AbstractCollection.toString()
public MutableLongIterator longIterator()
LongIterable
longIterator
in interface LongIterable
longIterator
in interface MutableLongValuesMap
public <V> V injectInto(V injectedValue, ObjectLongToObjectFunction<? super V,? extends V> function)
injectInto
in interface LongIterable
public void clear()
clear
in interface MutableDoubleKeysMap
clear
in interface MutableLongValuesMap
public void put(double key, long value)
put
in interface MutableDoubleLongMap
public void putAll(DoubleLongMap map)
putAll
in interface MutableDoubleLongMap
public void removeKey(double key)
removeKey
in interface MutableDoubleKeysMap
removeKey
in interface MutableDoubleLongMap
public void remove(double key)
remove
in interface MutableDoubleLongMap
public long removeKeyIfAbsent(double key, long value)
removeKeyIfAbsent
in interface MutableDoubleLongMap
public long getIfAbsentPut(double key, long value)
getIfAbsentPut
in interface MutableDoubleLongMap
public long getIfAbsentPut(double key, LongFunction0 function)
getIfAbsentPut
in interface MutableDoubleLongMap
public <P> long getIfAbsentPutWith(double key, LongFunction<? super P> function, P parameter)
getIfAbsentPutWith
in interface MutableDoubleLongMap
public long getIfAbsentPutWithKey(double key, DoubleToLongFunction function)
getIfAbsentPutWithKey
in interface MutableDoubleLongMap
public long addToValue(double key, long toBeAdded)
addToValue
in interface MutableDoubleLongMap
public long updateValue(double key, long initialValueIfAbsent, LongToLongFunction function)
updateValue
in interface MutableDoubleLongMap
public DoubleLongHashMap withKeyValue(double key1, long value1)
withKeyValue
in interface MutableDoubleLongMap
public DoubleLongHashMap withKeysValues(double key1, long value1, double key2, long value2)
public DoubleLongHashMap withKeysValues(double key1, long value1, double key2, long value2, double key3, long value3)
public DoubleLongHashMap withKeysValues(double key1, long value1, double key2, long value2, double key3, long value3, double key4, long value4)
public DoubleLongHashMap withoutKey(double key)
withoutKey
in interface MutableDoubleLongMap
public DoubleLongHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys
in interface MutableDoubleLongMap
public MutableDoubleLongMap asUnmodifiable()
asUnmodifiable
in interface MutableDoubleLongMap
public MutableDoubleLongMap asSynchronized()
asSynchronized
in interface MutableDoubleLongMap
public ImmutableDoubleLongMap toImmutable()
toImmutable
in interface DoubleLongMap
public long get(double key)
get
in interface DoubleLongMap
public long getIfAbsent(double key, long ifAbsent)
getIfAbsent
in interface DoubleLongMap
public long getOrThrow(double key)
getOrThrow
in interface DoubleLongMap
public boolean containsKey(double key)
containsKey
in interface DoubleKeysMap
containsKey
in interface DoubleLongMap
public void forEachKey(DoubleProcedure procedure)
forEachKey
in interface DoubleKeysMap
forEachKey
in interface DoubleLongMap
public void forEachKeyValue(DoubleLongProcedure procedure)
forEachKeyValue
in interface DoubleLongMap
public LazyDoubleIterable keysView()
keysView
in interface DoubleLongMap
public RichIterable<DoubleLongPair> keyValuesView()
keyValuesView
in interface DoubleLongMap
public DoubleLongHashMap select(DoubleLongPredicate predicate)
select
in interface DoubleLongMap
select
in interface MutableDoubleLongMap
public DoubleLongHashMap reject(DoubleLongPredicate predicate)
reject
in interface DoubleLongMap
reject
in interface MutableDoubleLongMap
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 DoubleLongMap
public MutableLongCollection values()
values
in interface LongValuesMap
Copyright © 2004–2017. All rights reserved.