java.io.Serializable, DoubleBag, MutableDoubleBag, MutableDoubleCollection, DoubleIterable, PrimitiveIterablepublic class UnmodifiableDoubleBag extends AbstractUnmodifiableDoubleCollection implements MutableDoubleBag
| Constructor | Description |
|---|---|
UnmodifiableDoubleBag(MutableDoubleBag bag) |
| Modifier and Type | Method | 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) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
boolean |
equals(java.lang.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(). |
MutableDoubleBag |
newEmpty() |
Creates a new empty mutable version of the same Bag type.
|
int |
occurrencesOf(double item) |
The occurrences of a distinct item in the bag.
|
MutableDoubleBag |
reject(DoublePredicate predicate) |
Returns a new DoubleIterable with all of the elements in the DoubleIterable that
return false for the specified predicate.
|
boolean |
removeOccurrences(double item,
int occurrences) |
|
MutableDoubleBag |
select(DoublePredicate predicate) |
Returns a new DoubleIterable with all of the elements in the DoubleIterable that
return true for the specified predicate.
|
MutableDoubleBag |
selectByOccurrences(IntPredicate predicate) |
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
MutableDoubleSet |
selectUnique() |
Returns all elements of the bag that have exactly one occurrence.
|
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, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, doubleIterator, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringtoStringOfItemToCountallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListselectDuplicates, tapadd, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAllappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic UnmodifiableDoubleBag(MutableDoubleBag bag)
public UnmodifiableDoubleBag with(double element)
with in interface MutableDoubleBagwith in interface MutableDoubleCollectionwith in class AbstractUnmodifiableDoubleCollectionpublic UnmodifiableDoubleBag without(double element)
without in interface MutableDoubleBagwithout in interface MutableDoubleCollectionwithout in class AbstractUnmodifiableDoubleCollectionpublic UnmodifiableDoubleBag withAll(DoubleIterable elements)
withAll in interface MutableDoubleBagwithAll in interface MutableDoubleCollectionwithAll in class AbstractUnmodifiableDoubleCollectionpublic UnmodifiableDoubleBag withoutAll(DoubleIterable elements)
withoutAll in interface MutableDoubleBagwithoutAll in interface MutableDoubleCollectionwithoutAll in class AbstractUnmodifiableDoubleCollectionpublic void addOccurrences(double item,
int occurrences)
addOccurrences in interface MutableDoubleBagpublic boolean removeOccurrences(double item,
int occurrences)
removeOccurrences in interface MutableDoubleBagpublic int sizeDistinct()
DoubleBagsizeDistinct in interface DoubleBagpublic int occurrencesOf(double item)
DoubleBagoccurrencesOf in interface DoubleBagpublic void forEachWithOccurrences(DoubleIntProcedure procedure)
DoubleBagforEachWithOccurrences in interface DoubleBagpublic MutableDoubleBag selectByOccurrences(IntPredicate predicate)
MutableDoubleBagselectByOccurrences in interface DoubleBagselectByOccurrences in interface MutableDoubleBagpublic MutableDoubleSet selectUnique()
MutableDoubleBagselectUnique in interface DoubleBagselectUnique in interface MutableDoubleBagpublic MutableList<DoubleIntPair> topOccurrences(int count)
MutableDoubleBagcount 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 DoubleBagtopOccurrences in interface MutableDoubleBagpublic MutableList<DoubleIntPair> bottomOccurrences(int count)
MutableDoubleBagcount 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 DoubleBagbottomOccurrences in interface MutableDoubleBagpublic MutableDoubleBag select(DoublePredicate predicate)
DoubleIterableselect in interface DoubleBagselect in interface DoubleIterableselect in interface MutableDoubleBagselect in interface MutableDoubleCollectionselect in class AbstractUnmodifiableDoubleCollectionpublic MutableDoubleBag reject(DoublePredicate predicate)
DoubleIterablereject in interface DoubleBagreject in interface DoubleIterablereject in interface MutableDoubleBagreject in interface MutableDoubleCollectionreject in class AbstractUnmodifiableDoubleCollectionpublic <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
DoubleIterablecollect in interface DoubleBagcollect in interface DoubleIterablecollect in interface MutableDoubleBagcollect in interface MutableDoubleCollectioncollect in class AbstractUnmodifiableDoubleCollectionpublic boolean equals(java.lang.Object otherBag)
DoubleBagBag.equals(Object).public int hashCode()
DoubleBagBag.hashCode().public MutableDoubleBag asUnmodifiable()
asUnmodifiable in interface MutableDoubleBagasUnmodifiable in interface MutableDoubleCollectionasUnmodifiable in class AbstractUnmodifiableDoubleCollectionpublic MutableDoubleBag asSynchronized()
asSynchronized in interface MutableDoubleBagasSynchronized in interface MutableDoubleCollectionasSynchronized in class AbstractUnmodifiableDoubleCollectionpublic ImmutableDoubleBag toImmutable()
MutableDoubleBagtoImmutable in interface DoubleBagtoImmutable in interface MutableDoubleBagtoImmutable in interface MutableDoubleCollectiontoImmutable in class AbstractUnmodifiableDoubleCollectionpublic MutableDoubleBag newEmpty()
MutableDoubleBagnewEmpty in interface MutableDoubleBagnewEmpty in interface MutableDoubleCollectionCopyright © 2004–2020. All rights reserved.