@NotThreadSafe public final class UnmodifiableDoubleBag extends AbstractUnmodifiableDoubleCollection implements MutableDoubleBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(double item,
int occurrences) |
MutableDoubleBag |
asSynchronized() |
MutableDoubleBag |
asUnmodifiable() |
MutableList<DoubleIntPair> |
bottomOccurrences(int count)
Returns the
count least frequently occurring items. |
<V> MutableBag<V> |
collect(DoubleToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object) . |
void |
forEachWithOccurrences(DoubleIntProcedure procedure)
For each distinct item, with the number of occurrences, execute the specified procedure.
|
int |
hashCode()
Follows the same general contract as
Bag.hashCode() . |
int |
occurrencesOf(double item)
The occurrences of a distinct item in the bag.
|
MutableDoubleBag |
reject(DoublePredicate predicate) |
boolean |
removeOccurrences(double item,
int occurrences) |
MutableDoubleBag |
select(DoublePredicate predicate) |
MutableDoubleBag |
selectByOccurrences(IntPredicate predicate)
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableDoubleBag |
toImmutable()
Returns an immutable copy of this bag.
|
MutableList<DoubleIntPair> |
topOccurrences(int count)
Returns the
count most frequently occurring items. |
UnmodifiableDoubleBag |
with(double element) |
UnmodifiableDoubleBag |
withAll(DoubleIterable elements) |
UnmodifiableDoubleBag |
without(double element) |
UnmodifiableDoubleBag |
withoutAll(DoubleIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, clear, contains, containsAll, containsAll, count, detectIfNone, doubleIterator, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
add, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, retainAll, retainAll
allSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public UnmodifiableDoubleBag with(double element)
with
in interface MutableDoubleBag
with
in interface MutableDoubleCollection
with
in class AbstractUnmodifiableDoubleCollection
public UnmodifiableDoubleBag without(double element)
without
in interface MutableDoubleBag
without
in interface MutableDoubleCollection
without
in class AbstractUnmodifiableDoubleCollection
public UnmodifiableDoubleBag withAll(DoubleIterable elements)
withAll
in interface MutableDoubleBag
withAll
in interface MutableDoubleCollection
withAll
in class AbstractUnmodifiableDoubleCollection
public UnmodifiableDoubleBag withoutAll(DoubleIterable elements)
withoutAll
in interface MutableDoubleBag
withoutAll
in interface MutableDoubleCollection
withoutAll
in class AbstractUnmodifiableDoubleCollection
public void addOccurrences(double item, int occurrences)
addOccurrences
in interface MutableDoubleBag
public boolean removeOccurrences(double item, int occurrences)
removeOccurrences
in interface MutableDoubleBag
public int sizeDistinct()
DoubleBag
sizeDistinct
in interface DoubleBag
public int occurrencesOf(double item)
DoubleBag
occurrencesOf
in interface DoubleBag
public void forEachWithOccurrences(DoubleIntProcedure procedure)
DoubleBag
forEachWithOccurrences
in interface DoubleBag
public MutableDoubleBag selectByOccurrences(IntPredicate predicate)
MutableDoubleBag
selectByOccurrences
in interface DoubleBag
selectByOccurrences
in interface MutableDoubleBag
public MutableList<DoubleIntPair> topOccurrences(int count)
MutableDoubleBag
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.topOccurrences
in interface DoubleBag
topOccurrences
in interface MutableDoubleBag
public MutableList<DoubleIntPair> bottomOccurrences(int count)
MutableDoubleBag
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.bottomOccurrences
in interface DoubleBag
bottomOccurrences
in interface MutableDoubleBag
public MutableDoubleBag select(DoublePredicate predicate)
select
in interface DoubleBag
select
in interface MutableDoubleBag
select
in interface MutableDoubleCollection
select
in interface DoubleIterable
select
in class AbstractUnmodifiableDoubleCollection
public MutableDoubleBag reject(DoublePredicate predicate)
reject
in interface DoubleBag
reject
in interface MutableDoubleBag
reject
in interface MutableDoubleCollection
reject
in interface DoubleIterable
reject
in class AbstractUnmodifiableDoubleCollection
public <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
collect
in interface DoubleBag
collect
in interface MutableDoubleBag
collect
in interface MutableDoubleCollection
collect
in interface DoubleIterable
collect
in class AbstractUnmodifiableDoubleCollection
public boolean equals(Object otherBag)
DoubleBag
Bag.equals(Object)
.public int hashCode()
DoubleBag
Bag.hashCode()
.public MutableDoubleBag asUnmodifiable()
asUnmodifiable
in interface MutableDoubleBag
asUnmodifiable
in interface MutableDoubleCollection
asUnmodifiable
in class AbstractUnmodifiableDoubleCollection
public MutableDoubleBag asSynchronized()
asSynchronized
in interface MutableDoubleBag
asSynchronized
in interface MutableDoubleCollection
asSynchronized
in class AbstractUnmodifiableDoubleCollection
public ImmutableDoubleBag toImmutable()
MutableDoubleBag
toImmutable
in interface DoubleBag
toImmutable
in interface MutableDoubleBag
toImmutable
in interface MutableDoubleCollection
toImmutable
in class AbstractUnmodifiableDoubleCollection
Copyright © 2004–2016. All rights reserved.