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

public Interface MutableLongBag

extends MutableLongCollection, LongBag
Imports
org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.block.function.primitive.LongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongProcedure, org.eclipse.collections.api.collection.primitive.MutableLongCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.LongIntPair, org.eclipse.collections.api.set.primitive.MutableLongSet

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

Method Summary

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

public MutableLongBag
public MutableLongBag
public MutableList<LongIntPair>
bottomOccurrences(int count)

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

Returns the count least frequently occurring items.

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.collect, org.eclipse.collections.api.bag.primitive.LongBag.collect.

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

public default MutableLongBag
newEmpty()

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

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

public MutableLongBag
reject(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.reject, org.eclipse.collections.api.bag.primitive.LongBag.reject.

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

public boolean
removeOccurrences(long item, int occurrences)

public MutableLongBag
select(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.select, org.eclipse.collections.api.bag.primitive.LongBag.select.

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

public MutableLongBag
selectByOccurrences(IntPredicate predicate)

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

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

public default MutableLongBag
selectDuplicates()

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

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

public MutableLongSet
selectUnique()

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

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

public default MutableLongBag
public ImmutableLongBag
public MutableList<LongIntPair>
topOccurrences(int count)

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

Returns the count most frequently occurring items.

public MutableLongBag
public MutableLongBag
public MutableLongBag
public MutableLongBag
Inherited from org.eclipse.collections.api.bag.primitive.LongBag:
equalsforEachWithOccurrenceshashCodeoccurrencesOfsizeDistincttoStringOfItemToCount
Inherited from org.eclipse.collections.api.collection.primitive.MutableLongCollection:
addaddAlladdAllclearlongIteratorremoveremoveAllremoveAllremoveIfretainAllretainAll

Method Detail

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

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

Annotations
@Override
asUnmodifiableback to summary
public MutableLongBag asUnmodifiable()

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

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

Redeclares org.eclipse.collections.api.bag.primitive.LongBag.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(LongToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.collect, org.eclipse.collections.api.bag.primitive.LongBag.collect.

Doc from org.eclipse.collections.api.LongIterable.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 MutableLongBag newEmpty()

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

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

Since
9.2.
rejectback to summary
public MutableLongBag reject(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.reject, org.eclipse.collections.api.bag.primitive.LongBag.reject.

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

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

Annotations
@Override
removeOccurrencesback to summary
public boolean removeOccurrences(long item, int occurrences)
selectback to summary
public MutableLongBag select(LongPredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.select, org.eclipse.collections.api.bag.primitive.LongBag.select.

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

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

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

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

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

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

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

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

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

Annotations
@Override
Since
9.2
tapback to summary
public default MutableLongBag tap(LongProcedure procedure)

Overrides default org.eclipse.collections.api.collection.primitive.MutableLongCollection.tap, org.eclipse.collections.api.bag.primitive.LongBag.tap.

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableLongCollection.toImmutable, org.eclipse.collections.api.bag.primitive.LongBag.toImmutable.

Returns an immutable copy of this bag.

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

Redeclares org.eclipse.collections.api.bag.primitive.LongBag.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 MutableLongBag with(long element)

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

Annotations
@Override
withAllback to summary
public MutableLongBag withAll(LongIterable elements)

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

Annotations
@Override
withoutback to summary
public MutableLongBag without(long element)

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

Annotations
@Override
withoutAllback to summary
public MutableLongBag withoutAll(LongIterable elements)

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

Annotations
@Override