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:
within interfaceMutableIntBag- Specified by:
within interfaceMutableIntCollection- Overrides:
within classAbstractSynchronizedIntCollection
-
without
public SynchronizedIntBag without(int element)
- Specified by:
withoutin interfaceMutableIntBag- Specified by:
withoutin interfaceMutableIntCollection- Overrides:
withoutin classAbstractSynchronizedIntCollection
-
withAll
public SynchronizedIntBag withAll(IntIterable elements)
- Specified by:
withAllin interfaceMutableIntBag- Specified by:
withAllin interfaceMutableIntCollection- Overrides:
withAllin classAbstractSynchronizedIntCollection
-
withoutAll
public SynchronizedIntBag withoutAll(IntIterable elements)
- Specified by:
withoutAllin interfaceMutableIntBag- Specified by:
withoutAllin interfaceMutableIntCollection- Overrides:
withoutAllin classAbstractSynchronizedIntCollection
-
addOccurrences
public void addOccurrences(int item, int occurrences)- Specified by:
addOccurrencesin interfaceMutableIntBag
-
removeOccurrences
public boolean removeOccurrences(int item, int occurrences)- Specified by:
removeOccurrencesin interfaceMutableIntBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceIntBag
-
occurrencesOf
public int occurrencesOf(int item)
- Specified by:
occurrencesOfin interfaceIntBag
-
forEachWithOccurrences
public void forEachWithOccurrences(IntIntProcedure procedure)
- Specified by:
forEachWithOccurrencesin interfaceIntBag
-
select
public MutableIntBag select(IntPredicate predicate)
- Specified by:
selectin interfaceIntBag- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceMutableIntBag- Specified by:
selectin interfaceMutableIntCollection- Overrides:
selectin classAbstractSynchronizedIntCollection
-
selectByOccurrences
public MutableIntBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrencesin interfaceIntBag- Specified by:
selectByOccurrencesin interfaceMutableIntBag
-
selectUnique
public MutableIntSet selectUnique()
- Specified by:
selectUniquein interfaceIntBag- Specified by:
selectUniquein interfaceMutableIntBag
-
topOccurrences
public MutableList<IntIntPair> topOccurrences(int count)
- Specified by:
topOccurrencesin interfaceIntBag- Specified by:
topOccurrencesin interfaceMutableIntBag
-
bottomOccurrences
public MutableList<IntIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrencesin interfaceIntBag- Specified by:
bottomOccurrencesin interfaceMutableIntBag
-
reject
public MutableIntBag reject(IntPredicate predicate)
- Specified by:
rejectin interfaceIntBag- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceMutableIntBag- Specified by:
rejectin interfaceMutableIntCollection- Overrides:
rejectin classAbstractSynchronizedIntCollection
-
collect
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceIntBag- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceMutableIntBag- Specified by:
collectin interfaceMutableIntCollection- Overrides:
collectin classAbstractSynchronizedIntCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyIntIterable asLazy()
- Specified by:
asLazyin interfaceIntIterable- Overrides:
asLazyin classAbstractSynchronizedIntCollection
-
asUnmodifiable
public MutableIntBag asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableIntBag- Specified by:
asUnmodifiablein interfaceMutableIntCollection- Overrides:
asUnmodifiablein classAbstractSynchronizedIntCollection
-
asSynchronized
public MutableIntBag asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableIntBag- Specified by:
asSynchronizedin interfaceMutableIntCollection- Overrides:
asSynchronizedin classAbstractSynchronizedIntCollection
-
toImmutable
public ImmutableIntBag toImmutable()
- Specified by:
toImmutablein interfaceIntBag- Specified by:
toImmutablein interfaceMutableIntBag- Specified by:
toImmutablein interfaceMutableIntCollection- Overrides:
toImmutablein classAbstractSynchronizedIntCollection
-
newEmpty
public MutableIntBag newEmpty()
- Specified by:
newEmptyin interfaceMutableIntBag- Specified by:
newEmptyin interfaceMutableIntCollection- Since:
- 9.2.
-
-