public class DoubleLongHashMap extends Object implements MutableDoubleLongMap, Externalizable
| Constructor and Description |
|---|
DoubleLongHashMap() |
DoubleLongHashMap(DoubleLongMap map) |
DoubleLongHashMap(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
long |
addToValue(double key,
long toBeAdded) |
boolean |
allSatisfy(LongPredicate predicate) |
boolean |
anySatisfy(LongPredicate predicate) |
void |
appendString(Appendable appendable)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator)
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end)
Prints a string representation of this collection onto the given
Appendable. |
LazyLongIterable |
asLazy() |
MutableDoubleLongMap |
asSynchronized() |
MutableDoubleLongMap |
asUnmodifiable() |
double |
average() |
void |
clear() |
<V> MutableCollection<V> |
collect(LongToObjectFunction<? extends V> function) |
void |
compact()
Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
|
boolean |
contains(long value) |
boolean |
containsAll(long... source) |
boolean |
containsAll(LongIterable source) |
boolean |
containsKey(double key) |
boolean |
containsValue(long value) |
int |
count(LongPredicate predicate) |
long |
detectIfNone(LongPredicate predicate,
long value) |
boolean |
equals(Object obj)
Follows the same general contract as
Map.equals(Object). |
void |
forEach(LongProcedure procedure) |
void |
forEachKey(DoubleProcedure procedure) |
void |
forEachKeyValue(DoubleLongProcedure procedure) |
void |
forEachValue(LongProcedure 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) |
boolean |
isEmpty()
Returns true if this iterable has zero items.
|
MutableDoubleSet |
keySet() |
LazyDoubleIterable |
keysView() |
RichIterable<DoubleLongPair> |
keyValuesView() |
LongIterator |
longIterator() |
String |
makeString()
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator)
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end)
Returns a string representation of this collection.
|
long |
max() |
long |
maxIfEmpty(long defaultValue) |
double |
median() |
long |
min() |
long |
minIfEmpty(long defaultValue) |
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) |
boolean |
noneSatisfy(LongPredicate predicate) |
boolean |
notEmpty()
The English equivalent of !this.isEmpty()
|
void |
put(double key,
long value) |
void |
putAll(DoubleLongMap map) |
void |
readExternal(ObjectInput in) |
DoubleLongHashMap |
reject(DoubleLongPredicate predicate) |
MutableLongCollection |
reject(LongPredicate predicate) |
void |
remove(double key) |
void |
removeKey(double key) |
long |
removeKeyIfAbsent(double key,
long value) |
DoubleLongHashMap |
select(DoubleLongPredicate predicate) |
MutableLongCollection |
select(LongPredicate predicate) |
int |
size()
Returns the number of items in this iterable.
|
long |
sum() |
long[] |
toArray() |
MutableLongBag |
toBag() |
ImmutableDoubleLongMap |
toImmutable() |
MutableLongList |
toList() |
MutableLongSet |
toSet() |
long[] |
toSortedArray() |
MutableLongList |
toSortedList() |
String |
toString()
Returns a string representation of this DoubleLongMap.
|
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) |
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)
DoubleLongMapMap.equals(Object).equals in interface DoubleLongMapequals in class Objectpublic int hashCode()
DoubleLongMapMap.hashCode().hashCode in interface DoubleLongMaphashCode in class Objectpublic String toString()
DoubleLongMaptoString in interface DoubleLongMaptoString in interface PrimitiveIterabletoString in class Objectpublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic LongIterator longIterator()
longIterator in interface LongIterablepublic long[] toArray()
toArray in interface LongIterablepublic boolean contains(long value)
contains in interface LongIterablepublic boolean containsAll(long... source)
containsAll in interface LongIterablepublic boolean containsAll(LongIterable source)
containsAll in interface LongIterablepublic void forEach(LongProcedure procedure)
forEach in interface LongIterablepublic MutableLongCollection select(LongPredicate predicate)
select in interface LongIterableselect in interface MutableDoubleLongMappublic MutableLongCollection reject(LongPredicate predicate)
reject in interface LongIterablereject in interface MutableDoubleLongMappublic <V> MutableCollection<V> collect(LongToObjectFunction<? extends V> function)
collect in interface LongIterablecollect in interface MutableDoubleLongMappublic long detectIfNone(LongPredicate predicate, long value)
detectIfNone in interface LongIterablepublic int count(LongPredicate predicate)
count in interface LongIterablepublic boolean anySatisfy(LongPredicate predicate)
anySatisfy in interface LongIterablepublic boolean allSatisfy(LongPredicate predicate)
allSatisfy in interface LongIterablepublic boolean noneSatisfy(LongPredicate predicate)
noneSatisfy in interface LongIterablepublic <V> V injectInto(V injectedValue,
ObjectLongToObjectFunction<? super V,? extends V> function)
injectInto in interface LongIterablepublic MutableLongList toList()
toList in interface LongIterablepublic MutableLongSet toSet()
toSet in interface LongIterablepublic MutableLongBag toBag()
toBag in interface LongIterablepublic LazyLongIterable asLazy()
asLazy in interface LongIterablepublic void clear()
clear in interface MutableDoubleLongMappublic void put(double key,
long value)
put in interface MutableDoubleLongMappublic void putAll(DoubleLongMap map)
putAll in interface MutableDoubleLongMappublic void removeKey(double key)
removeKey in interface MutableDoubleLongMappublic void remove(double key)
remove in interface MutableDoubleLongMappublic long removeKeyIfAbsent(double key,
long value)
removeKeyIfAbsent in interface MutableDoubleLongMappublic long getIfAbsentPut(double key,
long value)
getIfAbsentPut in interface MutableDoubleLongMappublic long getIfAbsentPut(double key,
LongFunction0 function)
getIfAbsentPut in interface MutableDoubleLongMappublic <P> long getIfAbsentPutWith(double key,
LongFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableDoubleLongMappublic long getIfAbsentPutWithKey(double key,
DoubleToLongFunction function)
getIfAbsentPutWithKey in interface MutableDoubleLongMappublic long addToValue(double key,
long toBeAdded)
addToValue in interface MutableDoubleLongMappublic long updateValue(double key,
long initialValueIfAbsent,
LongToLongFunction function)
updateValue in interface MutableDoubleLongMappublic DoubleLongHashMap withKeyValue(double key1, long value1)
withKeyValue in interface MutableDoubleLongMappublic 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 MutableDoubleLongMappublic DoubleLongHashMap withoutAllKeys(DoubleIterable keys)
withoutAllKeys in interface MutableDoubleLongMappublic MutableDoubleLongMap asUnmodifiable()
asUnmodifiable in interface MutableDoubleLongMappublic MutableDoubleLongMap asSynchronized()
asSynchronized in interface MutableDoubleLongMappublic ImmutableDoubleLongMap toImmutable()
toImmutable in interface DoubleLongMappublic long get(double key)
get in interface DoubleLongMappublic long getIfAbsent(double key,
long ifAbsent)
getIfAbsent in interface DoubleLongMappublic long getOrThrow(double key)
getOrThrow in interface DoubleLongMappublic boolean containsKey(double key)
containsKey in interface DoubleLongMappublic boolean containsValue(long value)
containsValue in interface DoubleLongMappublic void forEachValue(LongProcedure procedure)
forEachValue in interface DoubleLongMappublic void forEachKey(DoubleProcedure procedure)
forEachKey in interface DoubleLongMappublic void forEachKeyValue(DoubleLongProcedure procedure)
forEachKeyValue in interface DoubleLongMappublic LazyDoubleIterable keysView()
keysView in interface DoubleLongMappublic RichIterable<DoubleLongPair> keyValuesView()
keyValuesView in interface DoubleLongMappublic DoubleLongHashMap select(DoubleLongPredicate predicate)
select in interface DoubleLongMapselect in interface MutableDoubleLongMappublic DoubleLongHashMap reject(DoubleLongPredicate predicate)
reject in interface DoubleLongMapreject in interface MutableDoubleLongMappublic long sum()
sum in interface LongIterablepublic long max()
max in interface LongIterablepublic long maxIfEmpty(long defaultValue)
maxIfEmpty in interface LongIterablepublic long min()
min in interface LongIterablepublic long minIfEmpty(long defaultValue)
minIfEmpty in interface LongIterablepublic double average()
average in interface LongIterablepublic double median()
median in interface LongIterablepublic long[] toSortedArray()
toSortedArray in interface LongIterablepublic MutableLongList toSortedList()
toSortedList in interface LongIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void compact()
public MutableDoubleSet keySet()
keySet in interface DoubleLongMappublic MutableLongCollection values()
values in interface DoubleLongMapCopyright © 2004–2017. All rights reserved.