public interface ShortIntMap extends IntValuesMap
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(short 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). |
IntShortMap |
flipUniqueValues()
Return the IntShortMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEachKey(ShortProcedure procedure)
Iterates through each key in the map, invoking the procedure for each.
|
void |
forEachKeyValue(ShortIntProcedure procedure)
Iterates through each key/value pair in the map, invoking the procedure for each.
|
int |
get(short key)
Retrieves the value associated with the key.
|
int |
getIfAbsent(short key,
int ifAbsent)
Retrieves the value associated with the key, returning the specified default
value if no such mapping exists.
|
int |
getOrThrow(short 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(). |
MutableShortSet |
keySet()
Returns a set containing all the keys in this map.
|
LazyShortIterable |
keysView()
Returns a view of the keys in this map.
|
RichIterable<ShortIntPair> |
keyValuesView()
Returns a view of the key/value pairs in this map.
|
ShortIntMap |
reject(ShortIntPredicate predicate)
Return a copy of this map containing only the key/value pairs that do not match the
predicate.
|
ShortIntMap |
select(ShortIntPredicate predicate)
Return a copy of this map containing only the key/value pairs that match the predicate.
|
ImmutableShortIntMap |
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, count, detectIfNone, each, flatCollect, forEach, injectInto, intIterator, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeint get(short key)
0) is returned.key - the keyint getIfAbsent(short key,
int ifAbsent)
key - the keyifAbsent - the default value to return if no mapping exists for keyifAbsent if no such
mapping exists.int getOrThrow(short key)
IllegalStateException
if no such mapping exists.key - the keyIllegalStateException - if no mapping exists for the keyboolean containsKey(short key)
key - the keyvoid forEachKey(ShortProcedure procedure)
procedure - the procedure to invoke for each keyvoid forEachKeyValue(ShortIntProcedure procedure)
procedure - the procedure to invoke for each key/value pairLazyShortIterable keysView()
RichIterable<ShortIntPair> keyValuesView()
IntShortMap flipUniqueValues()
IllegalStateException - if the IntShortMap contains duplicate values.ShortIntMap select(ShortIntPredicate predicate)
predicate - the predicate to determine which key/value pairs in this map should be
included in the returned mapShortIntMap reject(ShortIntPredicate 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()ImmutableShortIntMap toImmutable()
MutableShortSet keySet()
Copyright © 2004–2020. All rights reserved.