Top Description Methods
org.eclipse.collections.api.map.primitive

public Interface ImmutableObjectShortMap<K>

extends ObjectShortMap<K>
Imports
org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.ObjectShortPredicate, .ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortProcedure, org.eclipse.collections.api.collection.ImmutableCollection, org.eclipse.collections.api.collection.primitive.ImmutableShortCollection

This file was automatically generated from template file immutableObjectPrimitiveMap.stg.
Since
3.0.

Method Summary

Modifier and TypeMethod and Description
public <V> ImmutableCollection<V>
collect(ShortToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.ShortIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public ImmutableShortObjectMap<K>
flipUniqueValues()

Redeclares org.eclipse.collections.api.map.primitive.ObjectShortMap.flipUniqueValues.

Return the ShortObjectMap that is obtained by flipping the direction of this map and making the associations from value to key.

public ImmutableObjectShortMap<K>

Returns:

an immutable copy of this map with value associated with key
newWithKeyValue
(K
the key to add
key
,
short
the value to associate with the key in the copy
value
)

Copy this map, associate the value with the key (replacing the value if one already exists for key), and return the copy as new immutable map.

public ImmutableObjectShortMap<K>

Returns:

an immutable copy of this map with all keys in keys removed
newWithoutAllKeys
(Iterable<? extends K>
the keys to remove
keys
)

Copy this map, remove any associated values with the specified keys (if any exist), and return the copy as a new immutable map.

public ImmutableObjectShortMap<K>

Returns:

an immutable copy of this map with key removed
newWithoutKey
(K
the key to remove
key
)

Copy this map, remove any associated value with the key (if one exists), and return the copy as a new immutable map.

public ImmutableObjectShortMap<K>
reject(ObjectShortPredicate<? super K> predicate)

Redeclares org.eclipse.collections.api.map.primitive.ObjectShortMap.reject.

Return a copy of this map containing only the key/value pairs that do not match the predicate.

public ImmutableShortCollection
reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.ShortIterable.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

public ImmutableObjectShortMap<K>
select(ObjectShortPredicate<? super K> predicate)

Redeclares org.eclipse.collections.api.map.primitive.ObjectShortMap.select.

Return a copy of this map containing only the key/value pairs that match the predicate.

public ImmutableShortCollection
select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.ShortIterable.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

public default ImmutableObjectShortMap<K>
Inherited from org.eclipse.collections.api.map.primitive.ObjectShortMap:
allSatisfyKeyValuecontainsKeycontainsValueforEachKeyforEachKeyValueforEachValuegetgetIfAbsentgetOrThrowinjectIntoKeyValuekeySetkeysViewkeyValuesViewtoImmutabletoStringvalues

Method Detail

collectback to summary
public <V> ImmutableCollection<V> collect(ShortToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.ShortIterable.collect.

Doc from org.eclipse.collections.api.ShortIterable.collect.

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.

Annotations
@Override
flipUniqueValuesback to summary
public ImmutableShortObjectMap<K> flipUniqueValues()

Redeclares org.eclipse.collections.api.map.primitive.ObjectShortMap.flipUniqueValues.

Doc from org.eclipse.collections.api.map.primitive.ObjectShortMap.flipUniqueValues.

Return the ShortObjectMap that is obtained by flipping the direction of this map and making the associations from value to key.

Annotations
@Override
newWithKeyValueback to summary
public ImmutableObjectShortMap<K> newWithKeyValue(K key, short value)

Copy this map, associate the value with the key (replacing the value if one already exists for key), and return the copy as new immutable map. A copy is always made even if key is already associated with value.

Parameters
key:K

the key to add

value:short

the value to associate with the key in the copy

Returns:ImmutableObjectShortMap<K>

an immutable copy of this map with value associated with key

newWithoutAllKeysback to summary
public ImmutableObjectShortMap<K> 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.

Parameters
keys:Iterable<? extends K>

the keys to remove

Returns:ImmutableObjectShortMap<K>

an immutable copy of this map with all keys in keys removed

newWithoutKeyback to summary
public ImmutableObjectShortMap<K> 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.

Parameters
key:K

the key to remove

Returns:ImmutableObjectShortMap<K>

an immutable copy of this map with key removed

rejectback to summary
public ImmutableObjectShortMap<K> reject(ObjectShortPredicate<? super K> predicate)

Redeclares org.eclipse.collections.api.map.primitive.ObjectShortMap.reject.

Doc from org.eclipse.collections.api.map.primitive.ObjectShortMap.reject.

Return a copy of this map containing only the key/value pairs that do not match the predicate.

Annotations
@Override
rejectback to summary
public ImmutableShortCollection reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.ShortIterable.reject.

Doc from org.eclipse.collections.api.ShortIterable.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

Annotations
@Override
selectback to summary
public ImmutableObjectShortMap<K> select(ObjectShortPredicate<? super K> predicate)

Redeclares org.eclipse.collections.api.map.primitive.ObjectShortMap.select.

Doc from org.eclipse.collections.api.map.primitive.ObjectShortMap.select.

Return a copy of this map containing only the key/value pairs that match the predicate.

Annotations
@Override
selectback to summary
public ImmutableShortCollection select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.ShortIterable.select.

Doc from org.eclipse.collections.api.ShortIterable.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

Annotations
@Override
tapback to summary
public default ImmutableObjectShortMap<K> tap(ShortProcedure procedure)

Overrides default org.eclipse.collections.api.map.primitive.ObjectShortMap.tap.

Annotations
@Override
Since
9.0.