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

public Interface DoubleBag

extends DoubleIterable
Known Direct Subinterfaces
org.eclipse.collections.api.bag.primitive.ImmutableDoubleBag, org.eclipse.collections.api.bag.primitive.MutableDoubleBag
Imports
java.util.StringJoiner, org.eclipse.collections.api.DoubleIterable, org.eclipse.collections.api.bag.Bag, 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, .DoubleIntProcedure, org.eclipse.collections.api.list.ListIterable, org.eclipse.collections.api.tuple.primitive.DoubleIntPair, org.eclipse.collections.api.set.primitive.DoubleSet

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

Method Summary

Modifier and TypeMethod and Description
public ListIterable<DoubleIntPair>
bottomOccurrences(int count)

Returns the count least frequently occurring items.

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

Redeclares 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.

public boolean
equals(Object o)

Follows the same general contract as Bag#equals(Object).

public void
forEachWithOccurrences(DoubleIntProcedure procedure)

For each distinct item, with the number of occurrences, execute the specified procedure.

public int
hashCode()

Follows the same general contract as Bag#hashCode().

public int
occurrencesOf(double item)

The occurrences of a distinct item in the bag.

public DoubleBag
reject(DoublePredicate predicate)

Redeclares 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.

public DoubleBag
select(DoublePredicate predicate)

Redeclares 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.

public DoubleBag
selectByOccurrences(IntPredicate predicate)

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

public default DoubleBag
selectDuplicates()

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

public DoubleSet
selectUnique()

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

public int
sizeDistinct()

The size of the Bag when counting only distinct elements.

public default DoubleBag
public ImmutableDoubleBag
toImmutable()

Returns an immutable copy of this bag.

public ListIterable<DoubleIntPair>
topOccurrences(int count)

Returns the count most frequently occurring items.

public default String
Inherited from org.eclipse.collections.api.DoubleIterable:
allSatisfyanySatisfyasLazyaverageaverageIfEmptychunkcollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIntcollectLongcollectShortcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNonedoubleIteratoreachflatCollectforEachinjectIntoinjectIntoBooleaninjectIntoByteinjectIntoCharinjectIntoDoubleinjectIntoFloatinjectIntoIntinjectIntoLonginjectIntoShortmaxmaxIfEmptymedianmedianIfEmptyminminIfEmptynoneSatisfyreducereduceIfEmptyrejectselectsumsummaryStatisticstoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoSortedListtoSortedListBytoSortedListBy

Method Detail

bottomOccurrencesback to summary
public ListIterable<DoubleIntPair> bottomOccurrences(int count)

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.

Since
8.0
collectback to summary
public <V> Bag<V> collect(DoubleToObjectFunction<? extends V> function)

Redeclares org.eclipse.collections.api.DoubleIterable.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
equalsback to summary
public boolean equals(Object o)

Follows the same general contract as Bag#equals(Object).

Annotations
@Override
forEachWithOccurrencesback to summary
public void forEachWithOccurrences(DoubleIntProcedure procedure)

For each distinct item, with the number of occurrences, execute the specified procedure.

hashCodeback to summary
public int hashCode()

Follows the same general contract as Bag#hashCode().

Annotations
@Override
occurrencesOfback to summary
public int occurrencesOf(double item)

The occurrences of a distinct item in the bag.

rejectback to summary
public DoubleBag reject(DoublePredicate predicate)

Redeclares org.eclipse.collections.api.DoubleIterable.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
selectback to summary
public DoubleBag select(DoublePredicate predicate)

Redeclares org.eclipse.collections.api.DoubleIterable.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 DoubleBag selectByOccurrences(IntPredicate predicate)

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

Since
8.0
selectDuplicatesback to summary
public default DoubleBag selectDuplicates()

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

Since
9.2
selectUniqueback to summary
public DoubleSet selectUnique()

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

Since
9.2
sizeDistinctback to summary
public int sizeDistinct()

The size of the Bag when counting only distinct elements.

tapback to summary
public default DoubleBag tap(DoubleProcedure procedure)

Overrides default org.eclipse.collections.api.DoubleIterable.tap.

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

Returns an immutable copy of this bag. If the bag is immutable, it returns itself.

topOccurrencesback to summary
public ListIterable<DoubleIntPair> topOccurrences(int count)

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.

Since
8.0
toStringOfItemToCountback to summary
public default String toStringOfItemToCount()
Since
9.2