Class SynchronizedIntBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedIntCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedIntBag
-
- All Implemented Interfaces:
Serializable
,IntBag
,MutableIntBag
,MutableIntCollection
,IntIterable
,PrimitiveIterable
public class SynchronizedIntBag extends AbstractSynchronizedIntCollection implements MutableIntBag
A synchronized view of aMutableIntBag
. It is imperative that the user manually synchronize on the collection when iterating over it using theIntIterator
, as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
MutableIntBag.asSynchronized()
,MutableBag.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedIntBag(MutableIntBag bag)
SynchronizedIntBag(MutableIntBag bag, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedIntCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, intIterator, 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.IntBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.IntIterable
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.MutableIntBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableIntCollection
add, addAll, addAll, clear, intIterator, 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
-
SynchronizedIntBag
public SynchronizedIntBag(MutableIntBag bag)
-
SynchronizedIntBag
public SynchronizedIntBag(MutableIntBag bag, Object newLock)
-
-
Method Detail
-
with
public SynchronizedIntBag with(int element)
- Specified by:
with
in interfaceMutableIntBag
- Specified by:
with
in interfaceMutableIntCollection
- Overrides:
with
in classAbstractSynchronizedIntCollection
-
without
public SynchronizedIntBag without(int element)
- Specified by:
without
in interfaceMutableIntBag
- Specified by:
without
in interfaceMutableIntCollection
- Overrides:
without
in classAbstractSynchronizedIntCollection
-
withAll
public SynchronizedIntBag withAll(IntIterable elements)
- Specified by:
withAll
in interfaceMutableIntBag
- Specified by:
withAll
in interfaceMutableIntCollection
- Overrides:
withAll
in classAbstractSynchronizedIntCollection
-
withoutAll
public SynchronizedIntBag withoutAll(IntIterable elements)
- Specified by:
withoutAll
in interfaceMutableIntBag
- Specified by:
withoutAll
in interfaceMutableIntCollection
- Overrides:
withoutAll
in classAbstractSynchronizedIntCollection
-
addOccurrences
public void addOccurrences(int item, int occurrences)
- Specified by:
addOccurrences
in interfaceMutableIntBag
-
removeOccurrences
public boolean removeOccurrences(int item, int occurrences)
- Specified by:
removeOccurrences
in interfaceMutableIntBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinct
in interfaceIntBag
-
occurrencesOf
public int occurrencesOf(int item)
- Specified by:
occurrencesOf
in interfaceIntBag
-
forEachWithOccurrences
public void forEachWithOccurrences(IntIntProcedure procedure)
- Specified by:
forEachWithOccurrences
in interfaceIntBag
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
select
in interfaceIntBag
- Specified by:
select
in interfaceIntIterable
- Specified by:
select
in interfaceMutableIntBag
- Specified by:
select
in interfaceMutableIntCollection
- Overrides:
select
in classAbstractSynchronizedIntCollection
-
selectByOccurrences
public MutableIntBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrences
in interfaceIntBag
- Specified by:
selectByOccurrences
in interfaceMutableIntBag
-
selectUnique
public MutableIntSet selectUnique()
- Specified by:
selectUnique
in interfaceIntBag
- Specified by:
selectUnique
in interfaceMutableIntBag
-
topOccurrences
public MutableList<IntIntPair> topOccurrences(int count)
- Specified by:
topOccurrences
in interfaceIntBag
- Specified by:
topOccurrences
in interfaceMutableIntBag
-
bottomOccurrences
public MutableList<IntIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrences
in interfaceIntBag
- Specified by:
bottomOccurrences
in interfaceMutableIntBag
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
reject
in interfaceIntBag
- Specified by:
reject
in interfaceIntIterable
- Specified by:
reject
in interfaceMutableIntBag
- Specified by:
reject
in interfaceMutableIntCollection
- Overrides:
reject
in classAbstractSynchronizedIntCollection
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceIntBag
- Specified by:
collect
in interfaceIntIterable
- Specified by:
collect
in interfaceMutableIntBag
- Specified by:
collect
in interfaceMutableIntCollection
- Overrides:
collect
in classAbstractSynchronizedIntCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazy
in interfaceIntIterable
- Overrides:
asLazy
in classAbstractSynchronizedIntCollection
-
asUnmodifiable
public MutableIntBag asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableIntBag
- Specified by:
asUnmodifiable
in interfaceMutableIntCollection
- Overrides:
asUnmodifiable
in classAbstractSynchronizedIntCollection
-
asSynchronized
public MutableIntBag asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableIntBag
- Specified by:
asSynchronized
in interfaceMutableIntCollection
- Overrides:
asSynchronized
in classAbstractSynchronizedIntCollection
-
toImmutable
public ImmutableIntBag toImmutable()
- Specified by:
toImmutable
in interfaceIntBag
- Specified by:
toImmutable
in interfaceMutableIntBag
- Specified by:
toImmutable
in interfaceMutableIntCollection
- Overrides:
toImmutable
in classAbstractSynchronizedIntCollection
-
newEmpty
public MutableIntBag newEmpty()
- Specified by:
newEmpty
in interfaceMutableIntBag
- Specified by:
newEmpty
in interfaceMutableIntCollection
- Since:
- 9.2.
-
-