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

public Interface ImmutableShortBag

extends ImmutableShortCollection, ShortBag
Imports
org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.bag.ImmutableBag, org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortProcedure, org.eclipse.collections.api.collection.primitive.ImmutableShortCollection, org.eclipse.collections.api.list.ImmutableList, org.eclipse.collections.api.tuple.primitive.ShortIntPair, org.eclipse.collections.api.set.primitive.ImmutableShortSet

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

Method Summary

Modifier and TypeMethod and Description
public ImmutableList<ShortIntPair>
bottomOccurrences(int count)

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.bottomOccurrences.

Returns the count least frequently occurring items.

public <V> ImmutableBag<V>
collect(ShortToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.collect, org.eclipse.collections.api.bag.primitive.ShortBag.collect.

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

public ImmutableShortBag
public ImmutableShortBag
public ImmutableShortBag
public ImmutableShortBag
public ImmutableShortBag
reject(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.reject, org.eclipse.collections.api.bag.primitive.ShortBag.reject.

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

public ImmutableShortBag
select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.select, org.eclipse.collections.api.bag.primitive.ShortBag.select.

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

public ImmutableShortBag
selectByOccurrences(IntPredicate predicate)

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

public default ImmutableShortBag
selectDuplicates()

Overrides default org.eclipse.collections.api.bag.primitive.ShortBag.selectDuplicates.

Returns all elements of the bag that have more than one occurrence.

public ImmutableShortSet
selectUnique()

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

public default ImmutableShortBag
public ImmutableList<ShortIntPair>
topOccurrences(int count)

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.topOccurrences.

Returns the count most frequently occurring items.

Inherited from org.eclipse.collections.api.bag.primitive.ShortBag:
equalsforEachWithOccurrenceshashCodeoccurrencesOfsizeDistincttoImmutabletoStringOfItemToCount

Method Detail

bottomOccurrencesback to summary
public ImmutableList<ShortIntPair> bottomOccurrences(int count)

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.bottomOccurrences.

Returns the count least frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.

Annotations
@Override
Since
8.0
collectback to summary
public <V> ImmutableBag<V> collect(ShortToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.collect, org.eclipse.collections.api.bag.primitive.ShortBag.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
newWithback to summary
public ImmutableShortBag newWith(short element)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.newWith.

Annotations
@Override
newWithAllback to summary
public ImmutableShortBag newWithAll(ShortIterable elements)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.newWithAll.

Annotations
@Override
newWithoutback to summary
public ImmutableShortBag newWithout(short element)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.newWithout.

Annotations
@Override
newWithoutAllback to summary
public ImmutableShortBag newWithoutAll(ShortIterable elements)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.newWithoutAll.

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

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.reject, org.eclipse.collections.api.bag.primitive.ShortBag.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 ImmutableShortBag select(ShortPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.select, org.eclipse.collections.api.bag.primitive.ShortBag.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
selectByOccurrencesback to summary
public ImmutableShortBag selectByOccurrences(IntPredicate predicate)

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

Annotations
@Override
Since
8.0
selectDuplicatesback to summary
public default ImmutableShortBag selectDuplicates()

Overrides default org.eclipse.collections.api.bag.primitive.ShortBag.selectDuplicates.

Returns all elements of the bag that have more than one occurrence.

Annotations
@Override
Since
9.2
selectUniqueback to summary
public ImmutableShortSet selectUnique()

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

Annotations
@Override
Since
9.2
tapback to summary
public default ImmutableShortBag tap(ShortProcedure procedure)

Overrides default org.eclipse.collections.api.collection.primitive.ImmutableShortCollection.tap, org.eclipse.collections.api.bag.primitive.ShortBag.tap.

Annotations
@Override
Since
9.0.
topOccurrencesback to summary
public ImmutableList<ShortIntPair> topOccurrences(int count)

Redeclares org.eclipse.collections.api.bag.primitive.ShortBag.topOccurrences.

Returns the count most frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.

Annotations
@Override
Since
8.0