@ThreadSafe public final class SynchronizedDoubleBag extends AbstractSynchronizedDoubleCollection implements com.gs.collections.api.bag.primitive.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| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(double item,
int occurrences) |
com.gs.collections.api.LazyDoubleIterable |
asLazy() |
com.gs.collections.api.bag.primitive.MutableDoubleBag |
asSynchronized() |
com.gs.collections.api.bag.primitive.MutableDoubleBag |
asUnmodifiable() |
<V> com.gs.collections.api.bag.MutableBag<V> |
collect(com.gs.collections.api.block.function.primitive.DoubleToObjectFunction<? extends V> function) |
boolean |
equals(java.lang.Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.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.
|
com.gs.collections.api.bag.primitive.MutableDoubleBag |
reject(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
boolean |
removeOccurrences(double item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableDoubleBag |
select(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
com.gs.collections.api.bag.primitive.ImmutableDoubleBag |
toImmutable()
Returns an immutable copy of this bag.
|
SynchronizedDoubleBag |
with(double element) |
SynchronizedDoubleBag |
withAll(com.gs.collections.api.DoubleIterable elements) |
SynchronizedDoubleBag |
without(double element) |
SynchronizedDoubleBag |
withoutAll(com.gs.collections.api.DoubleIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, doubleIterator, each, forEach, getDoubleCollection, getLock, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic SynchronizedDoubleBag with(double element)
with in interface com.gs.collections.api.bag.primitive.MutableDoubleBagwith in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwith in class AbstractSynchronizedDoubleCollectionpublic SynchronizedDoubleBag without(double element)
without in interface com.gs.collections.api.bag.primitive.MutableDoubleBagwithout in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwithout in class AbstractSynchronizedDoubleCollectionpublic SynchronizedDoubleBag withAll(com.gs.collections.api.DoubleIterable elements)
withAll in interface com.gs.collections.api.bag.primitive.MutableDoubleBagwithAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwithAll in class AbstractSynchronizedDoubleCollectionpublic SynchronizedDoubleBag withoutAll(com.gs.collections.api.DoubleIterable elements)
withoutAll in interface com.gs.collections.api.bag.primitive.MutableDoubleBagwithoutAll in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionwithoutAll in class AbstractSynchronizedDoubleCollectionpublic void addOccurrences(double item,
int occurrences)
addOccurrences in interface com.gs.collections.api.bag.primitive.MutableDoubleBagpublic boolean removeOccurrences(double item,
int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.primitive.MutableDoubleBagpublic int sizeDistinct()
com.gs.collections.api.bag.primitive.DoubleBagsizeDistinct in interface com.gs.collections.api.bag.primitive.DoubleBagpublic int occurrencesOf(double item)
com.gs.collections.api.bag.primitive.DoubleBagoccurrencesOf in interface com.gs.collections.api.bag.primitive.DoubleBagpublic void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.DoubleIntProcedure procedure)
com.gs.collections.api.bag.primitive.DoubleBagforEachWithOccurrences in interface com.gs.collections.api.bag.primitive.DoubleBagpublic com.gs.collections.api.bag.primitive.MutableDoubleBag select(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
select in interface com.gs.collections.api.bag.primitive.DoubleBagselect in interface com.gs.collections.api.bag.primitive.MutableDoubleBagselect in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionselect in interface com.gs.collections.api.DoubleIterableselect in class AbstractSynchronizedDoubleCollectionpublic com.gs.collections.api.bag.primitive.MutableDoubleBag reject(com.gs.collections.api.block.predicate.primitive.DoublePredicate predicate)
reject in interface com.gs.collections.api.bag.primitive.DoubleBagreject in interface com.gs.collections.api.bag.primitive.MutableDoubleBagreject in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionreject in interface com.gs.collections.api.DoubleIterablereject in class AbstractSynchronizedDoubleCollectionpublic <V> com.gs.collections.api.bag.MutableBag<V> collect(com.gs.collections.api.block.function.primitive.DoubleToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.bag.primitive.DoubleBagcollect in interface com.gs.collections.api.bag.primitive.MutableDoubleBagcollect in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectioncollect in interface com.gs.collections.api.DoubleIterablecollect in class AbstractSynchronizedDoubleCollectionpublic boolean equals(java.lang.Object otherBag)
com.gs.collections.api.bag.primitive.DoubleBagBag.equals(Object).equals in interface com.gs.collections.api.bag.primitive.DoubleBagequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.bag.primitive.DoubleBagBag.hashCode().hashCode in interface com.gs.collections.api.bag.primitive.DoubleBaghashCode in class java.lang.Objectpublic com.gs.collections.api.LazyDoubleIterable asLazy()
asLazy in interface com.gs.collections.api.DoubleIterableasLazy in class AbstractSynchronizedDoubleCollectionpublic com.gs.collections.api.bag.primitive.MutableDoubleBag asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.bag.primitive.MutableDoubleBagasUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionasUnmodifiable in class AbstractSynchronizedDoubleCollectionpublic com.gs.collections.api.bag.primitive.MutableDoubleBag asSynchronized()
asSynchronized in interface com.gs.collections.api.bag.primitive.MutableDoubleBagasSynchronized in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectionasSynchronized in class AbstractSynchronizedDoubleCollectionpublic com.gs.collections.api.bag.primitive.ImmutableDoubleBag toImmutable()
com.gs.collections.api.bag.primitive.MutableDoubleBagtoImmutable in interface com.gs.collections.api.bag.primitive.DoubleBagtoImmutable in interface com.gs.collections.api.bag.primitive.MutableDoubleBagtoImmutable in interface com.gs.collections.api.collection.primitive.MutableDoubleCollectiontoImmutable in class AbstractSynchronizedDoubleCollection