@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 FormModifier and Type | Method and Description |
---|---|
void |
addOccurrences(double item,
int occurrences) |
LazyDoubleIterable |
asLazy() |
MutableDoubleBag |
asSynchronized() |
MutableDoubleBag |
asUnmodifiable() |
<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) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableDoubleBag |
toImmutable()
Returns an immutable copy of this bag.
|
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, toString
add, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, retainAll, retainAll
allSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public SynchronizedDoubleBag with(double element)
with
in interface MutableDoubleBag
with
in interface MutableDoubleCollection
with
in class AbstractSynchronizedDoubleCollection
public SynchronizedDoubleBag without(double element)
without
in interface MutableDoubleBag
without
in interface MutableDoubleCollection
without
in class AbstractSynchronizedDoubleCollection
public SynchronizedDoubleBag withAll(DoubleIterable elements)
withAll
in interface MutableDoubleBag
withAll
in interface MutableDoubleCollection
withAll
in class AbstractSynchronizedDoubleCollection
public SynchronizedDoubleBag withoutAll(DoubleIterable elements)
withoutAll
in interface MutableDoubleBag
withoutAll
in interface MutableDoubleCollection
withoutAll
in class AbstractSynchronizedDoubleCollection
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 select(DoublePredicate predicate)
select
in interface DoubleBag
select
in interface MutableDoubleBag
select
in interface MutableDoubleCollection
select
in interface DoubleIterable
select
in class AbstractSynchronizedDoubleCollection
public MutableDoubleBag reject(DoublePredicate predicate)
reject
in interface DoubleBag
reject
in interface MutableDoubleBag
reject
in interface MutableDoubleCollection
reject
in interface DoubleIterable
reject
in class AbstractSynchronizedDoubleCollection
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 AbstractSynchronizedDoubleCollection
public boolean equals(Object otherBag)
DoubleBag
Bag.equals(Object)
.public int hashCode()
DoubleBag
Bag.hashCode()
.public LazyDoubleIterable asLazy()
asLazy
in interface DoubleIterable
asLazy
in class AbstractSynchronizedDoubleCollection
public MutableDoubleBag asUnmodifiable()
asUnmodifiable
in interface MutableDoubleBag
asUnmodifiable
in interface MutableDoubleCollection
asUnmodifiable
in class AbstractSynchronizedDoubleCollection
public MutableDoubleBag asSynchronized()
asSynchronized
in interface MutableDoubleBag
asSynchronized
in interface MutableDoubleCollection
asSynchronized
in class AbstractSynchronizedDoubleCollection
public ImmutableDoubleBag toImmutable()
MutableDoubleBag
toImmutable
in interface DoubleBag
toImmutable
in interface MutableDoubleBag
toImmutable
in interface MutableDoubleCollection
toImmutable
in class AbstractSynchronizedDoubleCollection
Copyright © 2004–2016. All rights reserved.