Serializable, DoubleBag, MutableDoubleBag, MutableDoubleCollection, DoubleIterable, PrimitiveIterable@ThreadSafe public final class SynchronizedDoubleBag extends AbstractSynchronizedDoubleCollection implements MutableDoubleBag
MutableDoubleBag. It is imperative that the user manually synchronize on the collection when iterating over it using the
DoubleIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveBag.stg.
MutableDoubleBag.asSynchronized(),
MutableBag.asSynchronized(),
Serialized Form| Constructor | Description |
|---|---|
SynchronizedDoubleBag(MutableDoubleBag bag) |
|
SynchronizedDoubleBag(MutableDoubleBag bag,
Object newLock) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addOccurrences(double item,
int occurrences) |
|
LazyDoubleIterable |
asLazy() |
Returns a LazyDoubleIterable adapter wrapping the source DoubleIterable.
|
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(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) |
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.
|
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. |
SynchronizedDoubleBag |
with(double element) |
|
SynchronizedDoubleBag |
withAll(DoubleIterable elements) |
|
SynchronizedDoubleBag |
without(double element) |
|
SynchronizedDoubleBag |
withoutAll(DoubleIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, 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, toStringallSatisfy, anySatisfy, average, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListadd, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, retainAll, retainAllappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic SynchronizedDoubleBag(MutableDoubleBag bag)
public SynchronizedDoubleBag(MutableDoubleBag bag, Object newLock)
public SynchronizedDoubleBag with(double element)
with in interface MutableDoubleBagwith in interface MutableDoubleCollectionwith in class AbstractSynchronizedDoubleCollectionpublic SynchronizedDoubleBag without(double element)
without in interface MutableDoubleBagwithout in interface MutableDoubleCollectionwithout in class AbstractSynchronizedDoubleCollectionpublic SynchronizedDoubleBag withAll(DoubleIterable elements)
withAll in interface MutableDoubleBagwithAll in interface MutableDoubleCollectionwithAll in class AbstractSynchronizedDoubleCollectionpublic SynchronizedDoubleBag withoutAll(DoubleIterable elements)
withoutAll in interface MutableDoubleBagwithoutAll in interface MutableDoubleCollectionwithoutAll in class AbstractSynchronizedDoubleCollectionpublic 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 select(DoublePredicate predicate)
DoubleIterableselect in interface DoubleBagselect in interface DoubleIterableselect in interface MutableDoubleBagselect in interface MutableDoubleCollectionselect in class AbstractSynchronizedDoubleCollectionpublic MutableDoubleBag selectByOccurrences(IntPredicate predicate)
MutableDoubleBagselectByOccurrences in interface DoubleBagselectByOccurrences 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 reject(DoublePredicate predicate)
DoubleIterablereject in interface DoubleBagreject in interface DoubleIterablereject in interface MutableDoubleBagreject in interface MutableDoubleCollectionreject in class AbstractSynchronizedDoubleCollectionpublic <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
DoubleIterablecollect in interface DoubleBagcollect in interface DoubleIterablecollect in interface MutableDoubleBagcollect in interface MutableDoubleCollectioncollect in class AbstractSynchronizedDoubleCollectionpublic boolean equals(Object otherBag)
DoubleBagBag.equals(Object).public int hashCode()
DoubleBagBag.hashCode().public LazyDoubleIterable asLazy()
DoubleIterableasLazy in interface DoubleIterableasLazy in class AbstractSynchronizedDoubleCollectionpublic MutableDoubleBag asUnmodifiable()
asUnmodifiable in interface MutableDoubleBagasUnmodifiable in interface MutableDoubleCollectionasUnmodifiable in class AbstractSynchronizedDoubleCollectionpublic MutableDoubleBag asSynchronized()
asSynchronized in interface MutableDoubleBagasSynchronized in interface MutableDoubleCollectionasSynchronized in class AbstractSynchronizedDoubleCollectionpublic ImmutableDoubleBag toImmutable()
MutableDoubleBagtoImmutable in interface DoubleBagtoImmutable in interface MutableDoubleBagtoImmutable in interface MutableDoubleCollectiontoImmutable in class AbstractSynchronizedDoubleCollectionCopyright © 2004–2017. All rights reserved.