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

public Interface MutableDoubleBag

extends MutableDoubleCollection, DoubleBag
Imports
org.eclipse.collections.api.DoubleIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.block.function.primitive.DoubleToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .DoublePredicate, org.eclipse.collections.api.block.procedure.primitive.DoubleProcedure, org.eclipse.collections.api.collection.primitive.MutableDoubleCollection, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.DoubleIntPair, org.eclipse.collections.api.set.primitive.MutableDoubleSet

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

Method Summary

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

public MutableDoubleBag
public MutableDoubleBag
public MutableList<DoubleIntPair>
bottomOccurrences(int count)

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

Returns the count least frequently occurring items.

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.collect, org.eclipse.collections.api.bag.primitive.DoubleBag.collect.

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

public default MutableDoubleBag
newEmpty()

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

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

public MutableDoubleBag
reject(DoublePredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.reject, org.eclipse.collections.api.bag.primitive.DoubleBag.reject.

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

public boolean
removeOccurrences(double item, int occurrences)

public MutableDoubleBag
select(DoublePredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.select, org.eclipse.collections.api.bag.primitive.DoubleBag.select.

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

public MutableDoubleBag
selectByOccurrences(IntPredicate predicate)

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

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

public default MutableDoubleBag
selectDuplicates()

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

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

public MutableDoubleSet
selectUnique()

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

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

public default MutableDoubleBag
public ImmutableDoubleBag
public MutableList<DoubleIntPair>
topOccurrences(int count)

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

Returns the count most frequently occurring items.

public MutableDoubleBag
public MutableDoubleBag
public MutableDoubleBag
public MutableDoubleBag
Inherited from org.eclipse.collections.api.bag.primitive.DoubleBag:
equalsforEachWithOccurrenceshashCodeoccurrencesOfsizeDistincttoStringOfItemToCount
Inherited from org.eclipse.collections.api.collection.primitive.MutableDoubleCollection:
addaddAlladdAllcleardoubleIteratorremoveremoveAllremoveAllremoveIfretainAllretainAll

Method Detail

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

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

Annotations
@Override
asUnmodifiableback to summary
public MutableDoubleBag asUnmodifiable()

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

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

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.collect, org.eclipse.collections.api.bag.primitive.DoubleBag.collect.

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

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

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

Since
9.2.
rejectback to summary
public MutableDoubleBag reject(DoublePredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.reject, org.eclipse.collections.api.bag.primitive.DoubleBag.reject.

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

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

Annotations
@Override
removeOccurrencesback to summary
public boolean removeOccurrences(double item, int occurrences)
selectback to summary
public MutableDoubleBag select(DoublePredicate predicate)

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.select, org.eclipse.collections.api.bag.primitive.DoubleBag.select.

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

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

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

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

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

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

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

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

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

Annotations
@Override
Since
9.2
tapback to summary
public default MutableDoubleBag tap(DoubleProcedure procedure)

Overrides default org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.tap, org.eclipse.collections.api.bag.primitive.DoubleBag.tap.

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

Redeclares org.eclipse.collections.api.collection.primitive.MutableDoubleCollection.toImmutable, org.eclipse.collections.api.bag.primitive.DoubleBag.toImmutable.

Returns an immutable copy of this bag.

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

Redeclares org.eclipse.collections.api.bag.primitive.DoubleBag.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 MutableDoubleBag with(double element)

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

Annotations
@Override
withAllback to summary
public MutableDoubleBag withAll(DoubleIterable elements)

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

Annotations
@Override
withoutback to summary
public MutableDoubleBag without(double element)

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

Annotations
@Override
withoutAllback to summary
public MutableDoubleBag withoutAll(DoubleIterable elements)

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

Annotations
@Override