public interface DoubleShortMap extends ShortValuesMap
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(double key)
Returns whether or not the key is present in the map.
|
boolean |
equals(Object o)
Follows the same general contract as
Map.equals(Object). |
ShortDoubleMap |
flipUniqueValues()
Return the ShortDoubleMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(DoubleProcedure procedure)
Iterates through each key in the map, invoking the procedure for each.
|
void |
forEachKeyValue(DoubleShortProcedure procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.
|
short |
get(double key)
Retrieves the value associated with the key.
|
short |
getIfAbsent(double key,
short ifAbsent)
Retrieves the value associated with the key, returning the specified default
value if no such mapping exists.
|
short |
getOrThrow(double key)
Retrieves the value associated with the key, throwing an
IllegalStateException
if no such mapping exists. |
int |
hashCode()
Follows the same general contract as
Map.hashCode(). |
default <IV> IV |
injectIntoKeyValue(IV injectedValue,
ObjectDoubleShortToObjectFunction<? super IV,? extends IV> function)
Implements the injectInto pattern with each key/value pair of the map.
|
MutableDoubleSet |
keySet()
Returns a set containing all the keys in this map.
|
LazyDoubleIterable |
keysView()
Returns a view of the keys in this map.
|
RichIterable<DoubleShortPair> |
keyValuesView()
Returns a view of the key/value pairs in this map.
|
DoubleShortMap |
reject(DoubleShortPredicate predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
DoubleShortMap |
select(DoubleShortPredicate predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
ImmutableDoubleShortMap |
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() |
collect, containsValue, forEachValue, reject, select, tap, valuesallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, shortIterator, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeshort get(double key)
0) is returned.key - the keyshort getIfAbsent(double key,
short ifAbsent)
key - the keyifAbsent - the default value to return if no mapping exists for keyifAbsent if no such
mapping exists.short getOrThrow(double key)
IllegalStateException
if no such mapping exists.key - the keyIllegalStateException - if no mapping exists for the keyboolean containsKey(double key)
key - the keyvoid forEachKey(DoubleProcedure procedure)
procedure - the procedure to invoke for each keyvoid forEachKeyValue(DoubleShortProcedure procedure)
procedure - the procedure to invoke for each key/value pairdefault <IV> IV injectIntoKeyValue(IV injectedValue,
ObjectDoubleShortToObjectFunction<? super IV,? extends IV> function)
value - to be injected into the mapfunction - to apply to the injected value and key/value pairsLazyDoubleIterable keysView()
RichIterable<DoubleShortPair> keyValuesView()
ShortDoubleMap flipUniqueValues()
IllegalStateException - if the ShortDoubleMap contains duplicate values.DoubleShortMap select(DoubleShortPredicate predicate)
predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapDoubleShortMap reject(DoubleShortPredicate predicate)
predicate - the predicate to determine which key/value pairs in this map should be
excluded from the returned mapboolean equals(Object o)
Map.equals(Object).int hashCode()
Map.hashCode().String toString()
AbstractMap.toString()toString in interface PrimitiveIterabletoString in class ObjectAbstractCollection.toString()ImmutableDoubleShortMap toImmutable()
MutableDoubleSet keySet()
Copyright © 2004–2022. All rights reserved.