public interface ObjectDoubleMap<K> extends DoubleIterable
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(Object key)
Returns whether or not the key is present in the map.
|
boolean |
containsValue(double value)
Returns whether or not this map contains the value.
|
DoubleObjectMap<K> |
flipUniqueValues()
Return the DoubleObjectMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(Procedure<? super K> procedure)
Iterates through each key in the map, invoking the procedure for each.
|
void |
forEachKeyValue(ObjectDoubleProcedure<? super K> procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.
|
void |
forEachValue(DoubleProcedure procedure)
Iterates through each value in this map.
|
double |
get(Object key)
Retrieves the value associated with the key.
|
double |
getIfAbsent(Object key,
double ifAbsent)
Retrieves the value associated with the key, returning the specified default
value if no such mapping exists.
|
double |
getOrThrow(Object key)
Retrieves the value associated with the key, throwing an
IllegalStateException
if no such mapping exists. |
Set<K> |
keySet()
Returns a set containing all the keys in this map.
|
LazyIterable<K> |
keysView()
Returns a view of the keys in this map.
|
RichIterable<ObjectDoublePair<K>> |
keyValuesView()
Returns a view of the key/value pairs in this map.
|
ObjectDoubleMap<K> |
reject(ObjectDoublePredicate<? super K> predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
ObjectDoubleMap<K> |
select(ObjectDoublePredicate<? super K> predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
default ObjectDoubleMap<K> |
tap(DoubleProcedure procedure) |
ImmutableObjectDoubleMap<K> |
toImmutable()
Returns a copy of this map that is immutable (if this map is mutable) or
itself if it is already immutable.
|
String |
toString()
Follows the same general contract as
AbstractMap.toString() |
MutableDoubleCollection |
values()
Returns the values in this map as a separate collection.
|
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, doubleIterator, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, reject, select, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizedouble get(Object key)
0) is returned.key - the keydouble getOrThrow(Object key)
IllegalStateException
if no such mapping exists.key - the keyIllegalStateException - if no mapping exists for the keydouble getIfAbsent(Object key, double ifAbsent)
key - the keyifAbsent - the default value to return if no mapping exists for keyifAbsent if no such
mapping exists.boolean containsKey(Object key)
key - the keyboolean containsValue(double value)
value - the value to testvoid forEachValue(DoubleProcedure procedure)
procedure - the procedure to invoke for each value in this map.void forEachKey(Procedure<? super K> procedure)
procedure - the procedure to invoke for each keyvoid forEachKeyValue(ObjectDoubleProcedure<? super K> procedure)
procedure - the procedure to invoke for each key/value pairDoubleObjectMap<K> flipUniqueValues()
IllegalStateException - if the DoubleObjectMap contains duplicate values.ObjectDoubleMap<K> select(ObjectDoublePredicate<? super K> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapObjectDoubleMap<K> reject(ObjectDoublePredicate<? super K> predicate)
predicate - the predicate to determine which key/value pairs in this map should be
excluded from the returned mapdefault ObjectDoubleMap<K> tap(DoubleProcedure procedure)
tap in interface DoubleIterableString toString()
AbstractMap.toString()toString in interface PrimitiveIterabletoString in class ObjectAbstractCollection.toString()ImmutableObjectDoubleMap<K> toImmutable()
Set<K> keySet()
MutableDoubleCollection values()
LazyIterable<K> keysView()
RichIterable<ObjectDoublePair<K>> keyValuesView()
Copyright © 2004–2020. All rights reserved.