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

public Interface MutableIntBag

extends MutableIntCollection, IntBag
Imports
org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.block.function.primitive.IntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntProcedure, org.eclipse.collections.api.collection.primitive.MutableIntCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.IntIntPair, org.eclipse.collections.api.set.primitive.MutableIntSet

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

Method Summary

Modifier and TypeMethod and Description
public void
addOccurrences(int item, int occurrences)

public MutableIntBag
public MutableIntBag
public MutableList<IntIntPair>
bottomOccurrences(int count)

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

Returns the count least frequently occurring items.

public <V> MutableBag<V>
collect(IntToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.collect, org.eclipse.collections.api.bag.primitive.IntBag.collect.

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

public default MutableIntBag
newEmpty()

Overrides default org.eclipse.collections.api.collection.primitive.MutableIntCollection.newEmpty.

Creates a new empty mutable version of the same Bag type.

public MutableIntBag
reject(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.reject, org.eclipse.collections.api.bag.primitive.IntBag.reject.

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

public boolean
removeOccurrences(int item, int occurrences)

public MutableIntBag
select(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.select, org.eclipse.collections.api.bag.primitive.IntBag.select.

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

public MutableIntBag
selectByOccurrences(IntPredicate predicate)

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

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

public default MutableIntBag
selectDuplicates()

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

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

public MutableIntSet
selectUnique()

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

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

public default MutableIntBag
public ImmutableIntBag
public MutableList<IntIntPair>
topOccurrences(int count)

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

Returns the count most frequently occurring items.

public MutableIntBag
public MutableIntBag
public MutableIntBag
public MutableIntBag
Inherited from org.eclipse.collections.api.bag.primitive.IntBag:
equalsforEachWithOccurrenceshashCodeoccurrencesOfsizeDistincttoStringOfItemToCount
Inherited from org.eclipse.collections.api.collection.primitive.MutableIntCollection:
addaddAlladdAllclearintIteratorremoveremoveAllremoveAllremoveIfretainAllretainAll

Method Detail

addOccurrencesback to summary
public void addOccurrences(int item, int occurrences)
asSynchronizedback to summary
public MutableIntBag asSynchronized()

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableIntBag asUnmodifiable()

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.asUnmodifiable.

Annotations
@Override
bottomOccurrencesback to summary
public MutableList<IntIntPair> bottomOccurrences(int count)

Redeclares org.eclipse.collections.api.bag.primitive.IntBag.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> MutableBag<V> collect(IntToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.collect, org.eclipse.collections.api.bag.primitive.IntBag.collect.

Doc from org.eclipse.collections.api.IntIterable.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
newEmptyback to summary
public default MutableIntBag newEmpty()

Overrides default org.eclipse.collections.api.collection.primitive.MutableIntCollection.newEmpty.

Creates a new empty mutable version of the same Bag type.

Since
9.2.
rejectback to summary
public MutableIntBag reject(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.reject, org.eclipse.collections.api.bag.primitive.IntBag.reject.

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

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

Annotations
@Override
removeOccurrencesback to summary
public boolean removeOccurrences(int item, int occurrences)
selectback to summary
public MutableIntBag select(IntPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.select, org.eclipse.collections.api.bag.primitive.IntBag.select.

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

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

Annotations
@Override
selectByOccurrencesback to summary
public MutableIntBag selectByOccurrences(IntPredicate predicate)

Redeclares org.eclipse.collections.api.bag.primitive.IntBag.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 MutableIntBag selectDuplicates()

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

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

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

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

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

Annotations
@Override
Since
9.2
tapback to summary
public default MutableIntBag tap(IntProcedure procedure)

Overrides default org.eclipse.collections.api.collection.primitive.MutableIntCollection.tap, org.eclipse.collections.api.bag.primitive.IntBag.tap.

Annotations
@Override
Since
9.0.
toImmutableback to summary
public ImmutableIntBag toImmutable()

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.toImmutable, org.eclipse.collections.api.bag.primitive.IntBag.toImmutable.

Returns an immutable copy of this bag.

Annotations
@Override
topOccurrencesback to summary
public MutableList<IntIntPair> topOccurrences(int count)

Redeclares org.eclipse.collections.api.bag.primitive.IntBag.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
withback to summary
public MutableIntBag with(int element)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.with.

Annotations
@Override
withAllback to summary
public MutableIntBag withAll(IntIterable elements)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.withAll.

Annotations
@Override
withoutback to summary
public MutableIntBag without(int element)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.without.

Annotations
@Override
withoutAllback to summary
public MutableIntBag withoutAll(IntIterable elements)

Redeclares org.eclipse.collections.api.collection.primitive.MutableIntCollection.withoutAll.

Annotations
@Override