Class SynchronizedByteBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedByteBag
-
- All Implemented Interfaces:
Serializable,ByteBag,MutableByteBag,ByteIterable,MutableByteCollection,PrimitiveIterable
public class SynchronizedByteBag extends AbstractSynchronizedByteCollection implements MutableByteBag
A synchronized view of aMutableByteBag. It is imperative that the user manually synchronize on the collection when iterating over it using theByteIterator, as perCollections.synchronizedCollection(Collection).This file was automatically generated from template file synchronizedPrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
MutableByteBag.asSynchronized(),MutableBag.asSynchronized(), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedByteBag(MutableByteBag bag)SynchronizedByteBag(MutableByteBag bag, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, byteIterator, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, 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.ByteBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.ByteIterable
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.MutableByteBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableByteCollection
add, addAll, addAll, byteIterator, clear, 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
-
SynchronizedByteBag
public SynchronizedByteBag(MutableByteBag bag)
-
SynchronizedByteBag
public SynchronizedByteBag(MutableByteBag bag, Object newLock)
-
-
Method Detail
-
with
public SynchronizedByteBag with(byte element)
- Specified by:
within interfaceMutableByteBag- Specified by:
within interfaceMutableByteCollection- Overrides:
within classAbstractSynchronizedByteCollection
-
without
public SynchronizedByteBag without(byte element)
- Specified by:
withoutin interfaceMutableByteBag- Specified by:
withoutin interfaceMutableByteCollection- Overrides:
withoutin classAbstractSynchronizedByteCollection
-
withAll
public SynchronizedByteBag withAll(ByteIterable elements)
- Specified by:
withAllin interfaceMutableByteBag- Specified by:
withAllin interfaceMutableByteCollection- Overrides:
withAllin classAbstractSynchronizedByteCollection
-
withoutAll
public SynchronizedByteBag withoutAll(ByteIterable elements)
- Specified by:
withoutAllin interfaceMutableByteBag- Specified by:
withoutAllin interfaceMutableByteCollection- Overrides:
withoutAllin classAbstractSynchronizedByteCollection
-
addOccurrences
public void addOccurrences(byte item, int occurrences)- Specified by:
addOccurrencesin interfaceMutableByteBag
-
removeOccurrences
public boolean removeOccurrences(byte item, int occurrences)- Specified by:
removeOccurrencesin interfaceMutableByteBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceByteBag
-
occurrencesOf
public int occurrencesOf(byte item)
- Specified by:
occurrencesOfin interfaceByteBag
-
forEachWithOccurrences
public void forEachWithOccurrences(ByteIntProcedure procedure)
- Specified by:
forEachWithOccurrencesin interfaceByteBag
-
select
public MutableByteBag select(BytePredicate predicate)
- Specified by:
selectin interfaceByteBag- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceMutableByteBag- Specified by:
selectin interfaceMutableByteCollection- Overrides:
selectin classAbstractSynchronizedByteCollection
-
selectByOccurrences
public MutableByteBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrencesin interfaceByteBag- Specified by:
selectByOccurrencesin interfaceMutableByteBag
-
selectUnique
public MutableByteSet selectUnique()
- Specified by:
selectUniquein interfaceByteBag- Specified by:
selectUniquein interfaceMutableByteBag
-
topOccurrences
public MutableList<ByteIntPair> topOccurrences(int count)
- Specified by:
topOccurrencesin interfaceByteBag- Specified by:
topOccurrencesin interfaceMutableByteBag
-
bottomOccurrences
public MutableList<ByteIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrencesin interfaceByteBag- Specified by:
bottomOccurrencesin interfaceMutableByteBag
-
reject
public MutableByteBag reject(BytePredicate predicate)
- Specified by:
rejectin interfaceByteBag- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceMutableByteBag- Specified by:
rejectin interfaceMutableByteCollection- Overrides:
rejectin classAbstractSynchronizedByteCollection
-
collect
public <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceByteBag- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceMutableByteBag- Specified by:
collectin interfaceMutableByteCollection- Overrides:
collectin classAbstractSynchronizedByteCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazyin interfaceByteIterable- Overrides:
asLazyin classAbstractSynchronizedByteCollection
-
asUnmodifiable
public MutableByteBag asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableByteBag- Specified by:
asUnmodifiablein interfaceMutableByteCollection- Overrides:
asUnmodifiablein classAbstractSynchronizedByteCollection
-
asSynchronized
public MutableByteBag asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableByteBag- Specified by:
asSynchronizedin interfaceMutableByteCollection- Overrides:
asSynchronizedin classAbstractSynchronizedByteCollection
-
toImmutable
public ImmutableByteBag toImmutable()
- Specified by:
toImmutablein interfaceByteBag- Specified by:
toImmutablein interfaceMutableByteBag- Specified by:
toImmutablein interfaceMutableByteCollection- Overrides:
toImmutablein classAbstractSynchronizedByteCollection
-
newEmpty
public MutableByteBag newEmpty()
- Specified by:
newEmptyin interfaceMutableByteBag- Specified by:
newEmptyin interfaceMutableByteCollection- Since:
- 9.2.
-
-