Interface ImmutableObjectShortMap<K>
- All Superinterfaces:
ObjectShortMap<K>
,PrimitiveIterable
,ShortIterable
- All Known Implementing Classes:
AbstractImmutableObjectShortMap
This file was automatically generated from template file immutableObjectPrimitiveMap.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and TypeMethodDescription<V> ImmutableCollection<V>
collect
(ShortToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.Return the ShortObjectMap that is obtained by flipping the direction of this map and making the associations from value to key.newWithKeyValue
(K key, short value) Copy this map, associate the value with the key (replacing the value if one already exists forkey
), and return the copy as new immutable map.newWithoutAllKeys
(Iterable<? extends K> keys) Copy this map, remove any associated values with the specified keys (if any exist), and return the copy as a new immutable map.newWithoutKey
(K key) Copy this map, remove any associated value with the key (if one exists), and return the copy as a new immutable map.reject
(ObjectShortPredicate<? super K> predicate) Return a copy of this map containing only the key/value pairs that do not match the predicate.reject
(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.select
(ObjectShortPredicate<? super K> predicate) Return a copy of this map containing only the key/value pairs that match the predicate.select
(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.default ImmutableObjectShortMap<K>
tap
(ShortProcedure procedure) Methods inherited from interface org.eclipse.collections.api.map.primitive.ObjectShortMap
containsKey, containsValue, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getOrThrow, injectIntoKeyValue, keySet, keysView, keyValuesView, toImmutable, toString, values
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
Methods inherited from interface org.eclipse.collections.api.ShortIterable
allSatisfy, 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, toSortedListBy
-
Method Details
-
select
Description copied from interface:ObjectShortMap
Return a copy of this map containing only the key/value pairs that match the predicate.- Specified by:
select
in interfaceObjectShortMap<K>
- 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
-
reject
Description copied from interface:ObjectShortMap
Return a copy of this map containing only the key/value pairs that do not match the predicate.- Specified by:
reject
in interfaceObjectShortMap<K>
- 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
-
select
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
select
in interfaceShortIterable
-
reject
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
reject
in interfaceShortIterable
-
tap
- Specified by:
tap
in interfaceObjectShortMap<K>
- Specified by:
tap
in interfaceShortIterable
- Since:
- 9.0.
-
collect
Description copied from interface:ShortIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceShortIterable
-
newWithKeyValue
Copy this map, associate the value with the key (replacing the value if one already exists forkey
), and return the copy as new immutable map. A copy is always made even ifkey
is already associated withvalue
.- Parameters:
key
- the key to addvalue
- the value to associate with the key in the copy- Returns:
- an immutable copy of this map with
value
associated withkey
-
newWithoutKey
Copy this map, remove any associated value with the key (if one exists), and return the copy as a new immutable map.- Parameters:
key
- the key to remove- Returns:
- an immutable copy of this map with
key
removed
-
newWithoutAllKeys
Copy this map, remove any associated values with the specified keys (if any exist), and return the copy as a new immutable map.- Parameters:
keys
- the keys to remove- Returns:
- an immutable copy of this map with all keys in
keys
removed
-
flipUniqueValues
ImmutableShortObjectMap<K> flipUniqueValues()Description copied from interface:ObjectShortMap
Return the ShortObjectMap that is obtained by flipping the direction of this map and making the associations from value to key.- Specified by:
flipUniqueValues
in interfaceObjectShortMap<K>
-