Interface ShortShortMap
- All Superinterfaces:
- PrimitiveIterable,- ShortIterable,- ShortValuesMap
- All Known Subinterfaces:
- ImmutableShortShortMap,- MutableShortShortMap
- All Known Implementing Classes:
- ShortShortHashMap,- SynchronizedShortShortMap,- UnmodifiableShortShortMap
This file was automatically generated from template file primitivePrimitiveMap.stg.
- Since:
- 3.0.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancontainsKey(short key) Returns whether or not the key is present in the map.booleanFollows the same general contract asMap.equals(Object).Return the ShortShortMap that is obtained by flipping the direction of this map and making the associations from value to key.voidforEachKey(ShortProcedure procedure) Iterates through each key in the map, invoking the procedure for each.voidforEachKeyValue(ShortShortProcedure procedure) Iterates through each key/value pair in the map, invoking the procedure for each.shortget(short key) Retrieves the value associated with the key.shortgetIfAbsent(short key, short ifAbsent) Retrieves the value associated with the key, returning the specified default value if no such mapping exists.shortgetOrThrow(short key) Retrieves the value associated with the key, throwing anIllegalStateExceptionif no such mapping exists.inthashCode()Follows the same general contract asMap.hashCode().default <IV> IVinjectIntoKeyValue(IV injectedValue, ObjectShortShortToObjectFunction<? super IV, ? extends IV> function) Implements the injectInto pattern with each key/value pair of the map.keySet()Returns a set containing all the keys in this map.keysView()Returns a view of the keys in this map.Returns a view of the key/value pairs in this map.reject(ShortShortPredicate predicate) Return a copy of this map containing only the key/value pairs that do not match the predicate.select(ShortShortPredicate predicate) Return a copy of this map containing only the key/value pairs that match the predicate.Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.toString()Follows the same general contract asAbstractMap.toString()Methods inherited from interface org.eclipse.collections.api.PrimitiveIterableappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, sizeMethods inherited from interface org.eclipse.collections.api.ShortIterableallSatisfy, 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.ShortValuesMapcollect, containsValue, forEachValue, reject, select, tap, values
- 
Method Details- 
getshort get(short key) Retrieves the value associated with the key. If no mapping exists for the key, the default value (usually0) is returned.- Parameters:
- key- the key
- Returns:
- the value associated with the key, or the default value if no such mapping exists
 
- 
getIfAbsentshort getIfAbsent(short key, short ifAbsent) Retrieves the value associated with the key, returning the specified default value if no such mapping exists.- Parameters:
- key- the key
- ifAbsent- the default value to return if no mapping exists for- key
- Returns:
- the value associated with the key, or ifAbsentif no such mapping exists.
 
- 
getOrThrowshort getOrThrow(short key) Retrieves the value associated with the key, throwing anIllegalStateExceptionif no such mapping exists.- Parameters:
- key- the key
- Returns:
- the value associated with the key
- Throws:
- IllegalStateException- if no mapping exists for the key
 
- 
containsKeyboolean containsKey(short key) Returns whether or not the key is present in the map.- Parameters:
- key- the key
- Returns:
- if a mapping exists in this map for the key
 
- 
forEachKeyIterates through each key in the map, invoking the procedure for each.- Parameters:
- procedure- the procedure to invoke for each key
 
- 
forEachKeyValueIterates through each key/value pair in the map, invoking the procedure for each.- Parameters:
- procedure- the procedure to invoke for each key/value pair
 
- 
injectIntoKeyValuedefault <IV> IV injectIntoKeyValue(IV injectedValue, ObjectShortShortToObjectFunction<? super IV, ? extends IV> function) Implements the injectInto pattern with each key/value pair of the map.- Parameters:
- value- to be injected into the map
- function- to apply to the injected value and key/value pairs
- Returns:
- result of injecting the injectedValue into the map
- Since:
- 11.1
 
- 
keysViewLazyShortIterable keysView()Returns a view of the keys in this map. This iterable is backed by the map, so any modifications to the underlying map will be reflected in the keys returned by the iterable.- Returns:
- a view of the keys in this map
- Since:
- 5.0
 
- 
keyValuesViewRichIterable<ShortShortPair> keyValuesView()Returns a view of the key/value pairs in this map. This iterable is backed by the map, so any modifications to the underlying map will be reflected in the pairs returned by the iterable.- Returns:
- a view of the keys in this map
- Since:
- 5.0
 
- 
flipUniqueValuesShortShortMap flipUniqueValues()Return the ShortShortMap that is obtained by flipping the direction of this map and making the associations from value to key.- Throws:
- IllegalStateException- if the ShortShortMap contains duplicate values.
- Since:
- 9.0
 
- 
selectReturn a copy of this map containing only the key/value pairs that match the predicate.- Parameters:
- predicate- the predicate to determine which key/value pairs in this map should be included in the returned map
- Returns:
- a copy of this map with the matching key/value pairs
 
- 
rejectReturn a copy of this map containing only the key/value pairs that do not match the predicate.- Parameters:
- predicate- the predicate to determine which key/value pairs in this map should be excluded from the returned map
- Returns:
- a copy of this map without the matching key/value pairs
 
- 
equalsFollows the same general contract asMap.equals(Object).
- 
hashCodeint hashCode()Follows the same general contract asMap.hashCode().
- 
toStringString toString()Follows the same general contract asAbstractMap.toString()- Specified by:
- toStringin interface- PrimitiveIterable
- Overrides:
- toStringin class- Object
- Returns:
- a string representation of this ShortShortMap
- See Also:
 
- 
toImmutableImmutableShortShortMap toImmutable()Returns a copy of this map that is immutable (if this map is mutable) or itself if it is already immutable.- Returns:
- an immutable map that is equivalent to this one
 
- 
keySetMutableShortSet keySet()Returns a set containing all the keys in this map. The set is backed by the map, so any modifications to the returned set will affect this map.- Returns:
- a mutable set containing the keys in this map
 
 
-