Class SynchronizedDoubleBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedDoubleCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedDoubleBag
-
- All Implemented Interfaces:
Serializable,DoubleBag,MutableDoubleBag,MutableDoubleCollection,DoubleIterable,PrimitiveIterable
public class SynchronizedDoubleBag extends AbstractSynchronizedDoubleCollection implements MutableDoubleBag
A synchronized view of aMutableDoubleBag. It is imperative that the user manually synchronize on the collection when iterating over it using theDoubleIterator, as perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
MutableDoubleBag.asSynchronized(),MutableBag.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedDoubleBag(MutableDoubleBag bag)SynchronizedDoubleBag(MutableDoubleBag bag, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedDoubleCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, doubleIterator, each, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.DoubleBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.DoubleIterable
allSatisfy, anySatisfy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.MutableDoubleBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableDoubleCollection
add, addAll, addAll, clear, doubleIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
SynchronizedDoubleBag
public SynchronizedDoubleBag(MutableDoubleBag bag)
-
SynchronizedDoubleBag
public SynchronizedDoubleBag(MutableDoubleBag bag, Object newLock)
-
-
Method Detail
-
with
public SynchronizedDoubleBag with(double element)
- Specified by:
within interfaceMutableDoubleBag- Specified by:
within interfaceMutableDoubleCollection- Overrides:
within classAbstractSynchronizedDoubleCollection
-
without
public SynchronizedDoubleBag without(double element)
- Specified by:
withoutin interfaceMutableDoubleBag- Specified by:
withoutin interfaceMutableDoubleCollection- Overrides:
withoutin classAbstractSynchronizedDoubleCollection
-
withAll
public SynchronizedDoubleBag withAll(DoubleIterable elements)
- Specified by:
withAllin interfaceMutableDoubleBag- Specified by:
withAllin interfaceMutableDoubleCollection- Overrides:
withAllin classAbstractSynchronizedDoubleCollection
-
withoutAll
public SynchronizedDoubleBag withoutAll(DoubleIterable elements)
- Specified by:
withoutAllin interfaceMutableDoubleBag- Specified by:
withoutAllin interfaceMutableDoubleCollection- Overrides:
withoutAllin classAbstractSynchronizedDoubleCollection
-
addOccurrences
public void addOccurrences(double item, int occurrences)- Specified by:
addOccurrencesin interfaceMutableDoubleBag
-
removeOccurrences
public boolean removeOccurrences(double item, int occurrences)- Specified by:
removeOccurrencesin interfaceMutableDoubleBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceDoubleBag
-
occurrencesOf
public int occurrencesOf(double item)
- Specified by:
occurrencesOfin interfaceDoubleBag
-
forEachWithOccurrences
public void forEachWithOccurrences(DoubleIntProcedure procedure)
- Specified by:
forEachWithOccurrencesin interfaceDoubleBag
-
select
public MutableDoubleBag select(DoublePredicate predicate)
- Specified by:
selectin interfaceDoubleBag- Specified by:
selectin interfaceDoubleIterable- Specified by:
selectin interfaceMutableDoubleBag- Specified by:
selectin interfaceMutableDoubleCollection- Overrides:
selectin classAbstractSynchronizedDoubleCollection
-
selectByOccurrences
public MutableDoubleBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrencesin interfaceDoubleBag- Specified by:
selectByOccurrencesin interfaceMutableDoubleBag
-
selectUnique
public MutableDoubleSet selectUnique()
- Specified by:
selectUniquein interfaceDoubleBag- Specified by:
selectUniquein interfaceMutableDoubleBag
-
topOccurrences
public MutableList<DoubleIntPair> topOccurrences(int count)
- Specified by:
topOccurrencesin interfaceDoubleBag- Specified by:
topOccurrencesin interfaceMutableDoubleBag
-
bottomOccurrences
public MutableList<DoubleIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrencesin interfaceDoubleBag- Specified by:
bottomOccurrencesin interfaceMutableDoubleBag
-
reject
public MutableDoubleBag reject(DoublePredicate predicate)
- Specified by:
rejectin interfaceDoubleBag- Specified by:
rejectin interfaceDoubleIterable- Specified by:
rejectin interfaceMutableDoubleBag- Specified by:
rejectin interfaceMutableDoubleCollection- Overrides:
rejectin classAbstractSynchronizedDoubleCollection
-
collect
public <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceDoubleBag- Specified by:
collectin interfaceDoubleIterable- Specified by:
collectin interfaceMutableDoubleBag- Specified by:
collectin interfaceMutableDoubleCollection- Overrides:
collectin classAbstractSynchronizedDoubleCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyDoubleIterable asLazy()
- Specified by:
asLazyin interfaceDoubleIterable- Overrides:
asLazyin classAbstractSynchronizedDoubleCollection
-
asUnmodifiable
public MutableDoubleBag asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableDoubleBag- Specified by:
asUnmodifiablein interfaceMutableDoubleCollection- Overrides:
asUnmodifiablein classAbstractSynchronizedDoubleCollection
-
asSynchronized
public MutableDoubleBag asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableDoubleBag- Specified by:
asSynchronizedin interfaceMutableDoubleCollection- Overrides:
asSynchronizedin classAbstractSynchronizedDoubleCollection
-
toImmutable
public ImmutableDoubleBag toImmutable()
- Specified by:
toImmutablein interfaceDoubleBag- Specified by:
toImmutablein interfaceMutableDoubleBag- Specified by:
toImmutablein interfaceMutableDoubleCollection- Overrides:
toImmutablein classAbstractSynchronizedDoubleCollection
-
newEmpty
public MutableDoubleBag newEmpty()
- Specified by:
newEmptyin interfaceMutableDoubleBag- Specified by:
newEmptyin interfaceMutableDoubleCollection- Since:
- 9.2.
-
-