Top Description Fields Constructors Methods
org.eclipse.collections.impl.bag.mutable.primitive

public Class SynchronizedByteBag

extends AbstractSynchronizedByteCollection
implements MutableByteBag
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.primitive.MutableByteBag, org.eclipse.collections.api.bag.primitive.ByteBag, org.eclipse.collections.api.ByteIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableByteCollection
Imports
java.util.Collection, .Collections, org.eclipse.collections.api.ByteIterable, .LazyByteIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.ImmutableByteBag, .MutableByteBag, org.eclipse.collections.api.block.function.primitive.ByteToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .BytePredicate, org.eclipse.collections.api.block.procedure.primitive.ByteIntProcedure, org.eclipse.collections.api.iterator.ByteIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.ByteIntPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection, org.eclipse.collections.impl.factory.primitive.ByteBags, org.eclipse.collections.impl.lazy.primitive.LazyByteIterableAdapter, org.eclipse.collections.api.set.primitive.MutableByteSet

A synchronized view of a MutableByteBag. It is imperative that the user manually synchronize on the collection when iterating over it using the ByteIterator, as per Collections#synchronizedCollection(Collection).

This file was automatically generated from template file synchronizedPrimitiveBag.stg.

Since
3.1.
See Also
MutableByteBag#asSynchronized(), MutableBag#asSynchronized()

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public LazyByteIterable
public MutableByteBag
public MutableByteBag
public MutableList<ByteIntPair>
bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.bottomOccurrences.

Returns the count least frequently occurring items.

public <V> MutableBag<V>
public boolean
equals(Object otherBag)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.bag.primitive.ByteBag.equals.

Follows the same general contract as Bag#equals(Object).

public void
forEachWithOccurrences(ByteIntProcedure procedure)

Implements org.eclipse.collections.api.bag.primitive.ByteBag.forEachWithOccurrences.

For each distinct item, with the number of occurrences, execute the specified procedure.

private MutableByteBag
public int
public MutableByteBag
public int
occurrencesOf(byte item)

Implements org.eclipse.collections.api.bag.primitive.ByteBag.occurrencesOf.

The occurrences of a distinct item in the bag.

public MutableByteBag
public boolean
public MutableByteBag
public MutableByteBag
selectByOccurrences(IntPredicate predicate)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

public MutableByteSet
selectUnique()

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

public int
sizeDistinct()

Implements org.eclipse.collections.api.bag.primitive.ByteBag.sizeDistinct.

The size of the Bag when counting only distinct elements.

public ImmutableByteBag
public MutableList<ByteIntPair>
topOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.topOccurrences.

Returns the count most frequently occurring items.

public SynchronizedByteBag
public SynchronizedByteBag
public SynchronizedByteBag
public SynchronizedByteBag
Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringaveragebyteIteratorchunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetByteCollectiongetLockinjectIntoisEmptymakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.serialVersionUID.

Constructor Detail

SynchronizedByteBagback to summary
public SynchronizedByteBag(MutableByteBag bag)
SynchronizedByteBagback to summary
public SynchronizedByteBag(MutableByteBag bag, Object newLock)

Method Detail

addOccurrencesback to summary
public void addOccurrences(byte item, int occurrences)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.addOccurrences.

Annotations
@Override
asLazyback to summary
public LazyByteIterable asLazy()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.asLazy.

Implements org.eclipse.collections.api.ByteIterable.asLazy.

Doc from org.eclipse.collections.api.ByteIterable.asLazy.

Returns a LazyByteIterable adapter wrapping the source ByteIterable.

Annotations
@Override
asSynchronizedback to summary
public MutableByteBag asSynchronized()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.asSynchronized.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableByteCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableByteBag asUnmodifiable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.asUnmodifiable.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableByteCollection.asUnmodifiable.

Annotations
@Override
bottomOccurrencesback to summary
public MutableList<ByteIntPair> bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.bottomOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableByteBag.bottomOccurrences.

Returns the count least frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.

Annotations
@Override
collectback to summary
public <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.collect.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.collect, org.eclipse.collections.api.collection.primitive.MutableByteCollection.collect.

Doc from org.eclipse.collections.api.ByteIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherBag)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.bag.primitive.ByteBag.equals.

Doc from org.eclipse.collections.api.bag.primitive.ByteBag.equals.

Follows the same general contract as Bag#equals(Object).

Annotations
@Override
forEachWithOccurrencesback to summary
public void forEachWithOccurrences(ByteIntProcedure procedure)

Implements org.eclipse.collections.api.bag.primitive.ByteBag.forEachWithOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.ByteBag.forEachWithOccurrences.

For each distinct item, with the number of occurrences, execute the specified procedure.

Annotations
@Override
getMutableByteBagback to summary
private MutableByteBag getMutableByteBag()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.bag.primitive.ByteBag.hashCode.

Doc from org.eclipse.collections.api.bag.primitive.ByteBag.hashCode.

Follows the same general contract as Bag#hashCode().

Annotations
@Override
newEmptyback to summary
public MutableByteBag newEmpty()

Overrides default org.eclipse.collections.api.bag.primitive.MutableByteBag.newEmpty, org.eclipse.collections.api.collection.primitive.MutableByteCollection.newEmpty.

Doc from org.eclipse.collections.api.bag.primitive.MutableByteBag.newEmpty.

Creates a new empty mutable version of the same Bag type.

Annotations
@Override
Since
9.2.
occurrencesOfback to summary
public int occurrencesOf(byte item)

Implements org.eclipse.collections.api.bag.primitive.ByteBag.occurrencesOf.

Doc from org.eclipse.collections.api.bag.primitive.ByteBag.occurrencesOf.

The occurrences of a distinct item in the bag.

Annotations
@Override
rejectback to summary
public MutableByteBag reject(BytePredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.reject.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.reject, org.eclipse.collections.api.collection.primitive.MutableByteCollection.reject.

Doc from org.eclipse.collections.api.ByteIterable.reject.

Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.

Annotations
@Override
removeOccurrencesback to summary
public boolean removeOccurrences(byte item, int occurrences)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.removeOccurrences.

Annotations
@Override
selectback to summary
public MutableByteBag select(BytePredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.select.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.select, org.eclipse.collections.api.collection.primitive.MutableByteCollection.select.

Doc from org.eclipse.collections.api.ByteIterable.select.

Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.

Annotations
@Override
selectByOccurrencesback to summary
public MutableByteBag selectByOccurrences(IntPredicate predicate)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.selectByOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableByteBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

Annotations
@Override
selectUniqueback to summary
public MutableByteSet selectUnique()

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.selectUnique.

Doc from org.eclipse.collections.api.bag.primitive.MutableByteBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

Annotations
@Override
sizeDistinctback to summary
public int sizeDistinct()

Implements org.eclipse.collections.api.bag.primitive.ByteBag.sizeDistinct.

Doc from org.eclipse.collections.api.bag.primitive.ByteBag.sizeDistinct.

The size of the Bag when counting only distinct elements.

Annotations
@Override
toImmutableback to summary
public ImmutableByteBag toImmutable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.toImmutable.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.toImmutable, org.eclipse.collections.api.collection.primitive.MutableByteCollection.toImmutable.

Doc from org.eclipse.collections.api.bag.primitive.MutableByteBag.toImmutable.

Returns an immutable copy of this bag.

Annotations
@Override
topOccurrencesback to summary
public MutableList<ByteIntPair> topOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.topOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableByteBag.topOccurrences.

Returns the count most frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.

Annotations
@Override
withback to summary
public SynchronizedByteBag with(byte element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.with.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.with, org.eclipse.collections.api.collection.primitive.MutableByteCollection.with.

Annotations
@Override
withAllback to summary
public SynchronizedByteBag withAll(ByteIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.withAll.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.withAll, org.eclipse.collections.api.collection.primitive.MutableByteCollection.withAll.

Annotations
@Override
withoutback to summary
public SynchronizedByteBag without(byte element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.without.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.without, org.eclipse.collections.api.collection.primitive.MutableByteCollection.without.

Annotations
@Override
withoutAllback to summary
public SynchronizedByteBag withoutAll(ByteIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedByteCollection.withoutAll.

Implements org.eclipse.collections.api.bag.primitive.MutableByteBag.withoutAll, org.eclipse.collections.api.collection.primitive.MutableByteCollection.withoutAll.

Annotations
@Override