Class SynchronizedLongBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedLongBag
-
- All Implemented Interfaces:
Serializable
,LongBag
,MutableLongBag
,MutableLongCollection
,LongIterable
,PrimitiveIterable
public class SynchronizedLongBag extends AbstractSynchronizedLongCollection implements MutableLongBag
A synchronized view of aMutableLongBag
. It is imperative that the user manually synchronize on the collection when iterating over it using theLongIterator
, as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
MutableLongBag.asSynchronized()
,MutableBag.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedLongBag(MutableLongBag bag)
SynchronizedLongBag(MutableLongBag bag, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedLongCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, isEmpty, longIterator, 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.LongBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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.MutableLongBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
add, addAll, addAll, clear, longIterator, 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
-
SynchronizedLongBag
public SynchronizedLongBag(MutableLongBag bag)
-
SynchronizedLongBag
public SynchronizedLongBag(MutableLongBag bag, Object newLock)
-
-
Method Detail
-
with
public SynchronizedLongBag with(long element)
- Specified by:
with
in interfaceMutableLongBag
- Specified by:
with
in interfaceMutableLongCollection
- Overrides:
with
in classAbstractSynchronizedLongCollection
-
without
public SynchronizedLongBag without(long element)
- Specified by:
without
in interfaceMutableLongBag
- Specified by:
without
in interfaceMutableLongCollection
- Overrides:
without
in classAbstractSynchronizedLongCollection
-
withAll
public SynchronizedLongBag withAll(LongIterable elements)
- Specified by:
withAll
in interfaceMutableLongBag
- Specified by:
withAll
in interfaceMutableLongCollection
- Overrides:
withAll
in classAbstractSynchronizedLongCollection
-
withoutAll
public SynchronizedLongBag withoutAll(LongIterable elements)
- Specified by:
withoutAll
in interfaceMutableLongBag
- Specified by:
withoutAll
in interfaceMutableLongCollection
- Overrides:
withoutAll
in classAbstractSynchronizedLongCollection
-
addOccurrences
public void addOccurrences(long item, int occurrences)
- Specified by:
addOccurrences
in interfaceMutableLongBag
-
removeOccurrences
public boolean removeOccurrences(long item, int occurrences)
- Specified by:
removeOccurrences
in interfaceMutableLongBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinct
in interfaceLongBag
-
occurrencesOf
public int occurrencesOf(long item)
- Specified by:
occurrencesOf
in interfaceLongBag
-
forEachWithOccurrences
public void forEachWithOccurrences(LongIntProcedure procedure)
- Specified by:
forEachWithOccurrences
in interfaceLongBag
-
select
public MutableLongBag select(LongPredicate predicate)
- Specified by:
select
in interfaceLongBag
- Specified by:
select
in interfaceLongIterable
- Specified by:
select
in interfaceMutableLongBag
- Specified by:
select
in interfaceMutableLongCollection
- Overrides:
select
in classAbstractSynchronizedLongCollection
-
selectByOccurrences
public MutableLongBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrences
in interfaceLongBag
- Specified by:
selectByOccurrences
in interfaceMutableLongBag
-
selectUnique
public MutableLongSet selectUnique()
- Specified by:
selectUnique
in interfaceLongBag
- Specified by:
selectUnique
in interfaceMutableLongBag
-
topOccurrences
public MutableList<LongIntPair> topOccurrences(int count)
- Specified by:
topOccurrences
in interfaceLongBag
- Specified by:
topOccurrences
in interfaceMutableLongBag
-
bottomOccurrences
public MutableList<LongIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrences
in interfaceLongBag
- Specified by:
bottomOccurrences
in interfaceMutableLongBag
-
reject
public MutableLongBag reject(LongPredicate predicate)
- Specified by:
reject
in interfaceLongBag
- Specified by:
reject
in interfaceLongIterable
- Specified by:
reject
in interfaceMutableLongBag
- Specified by:
reject
in interfaceMutableLongCollection
- Overrides:
reject
in classAbstractSynchronizedLongCollection
-
collect
public <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceLongBag
- Specified by:
collect
in interfaceLongIterable
- Specified by:
collect
in interfaceMutableLongBag
- Specified by:
collect
in interfaceMutableLongCollection
- Overrides:
collect
in classAbstractSynchronizedLongCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazy
in interfaceLongIterable
- Overrides:
asLazy
in classAbstractSynchronizedLongCollection
-
asUnmodifiable
public MutableLongBag asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongBag
- Specified by:
asUnmodifiable
in interfaceMutableLongCollection
- Overrides:
asUnmodifiable
in classAbstractSynchronizedLongCollection
-
asSynchronized
public MutableLongBag asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongBag
- Specified by:
asSynchronized
in interfaceMutableLongCollection
- Overrides:
asSynchronized
in classAbstractSynchronizedLongCollection
-
toImmutable
public ImmutableLongBag toImmutable()
- Specified by:
toImmutable
in interfaceLongBag
- Specified by:
toImmutable
in interfaceMutableLongBag
- Specified by:
toImmutable
in interfaceMutableLongCollection
- Overrides:
toImmutable
in classAbstractSynchronizedLongCollection
-
newEmpty
public MutableLongBag newEmpty()
- Specified by:
newEmpty
in interfaceMutableLongBag
- Specified by:
newEmpty
in interfaceMutableLongCollection
- Since:
- 9.2.
-
-