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

public Class SynchronizedBooleanBag

extends AbstractSynchronizedBooleanCollection
implements MutableBooleanBag
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.primitive.MutableBooleanBag, org.eclipse.collections.api.bag.primitive.BooleanBag, org.eclipse.collections.api.BooleanIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection
Imports
java.util.Collection, .Collections, org.eclipse.collections.api.BooleanIterable, .LazyBooleanIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.ImmutableBooleanBag, .MutableBooleanBag, org.eclipse.collections.api.block.function.primitive.BooleanToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .BooleanPredicate, org.eclipse.collections.api.block.procedure.primitive.BooleanIntProcedure, org.eclipse.collections.api.iterator.BooleanIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.BooleanIntPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection, org.eclipse.collections.impl.factory.primitive.BooleanBags, org.eclipse.collections.impl.lazy.primitive.LazyBooleanIterableAdapter, org.eclipse.collections.api.set.primitive.MutableBooleanSet

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

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

Since
3.1.
See Also
MutableBooleanBag#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 LazyBooleanIterable
public MutableBooleanBag
public MutableBooleanBag
public MutableList<BooleanIntPair>
bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.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.BooleanBag.equals.

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

public void
forEachWithOccurrences(BooleanIntProcedure procedure)

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

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

private MutableBooleanBag
public int
public MutableBooleanBag
public int
occurrencesOf(boolean item)

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

The occurrences of a distinct item in the bag.

public MutableBooleanBag
public boolean
public MutableBooleanBag
public MutableBooleanBag
selectByOccurrences(IntPredicate predicate)

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

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

public MutableBooleanSet
selectUnique()

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

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

public int
sizeDistinct()

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

The size of the Bag when counting only distinct elements.

public ImmutableBooleanBag
public MutableList<BooleanIntPair>
topOccurrences(int count)

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

Returns the count most frequently occurring items.

public SynchronizedBooleanBag
public SynchronizedBooleanBag
public SynchronizedBooleanBag
public SynchronizedBooleanBag
Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedBooleanCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringbooleanIteratorchunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetBooleanCollectiongetLockinjectIntoisEmptymakeStringmakeStringmakeStringnoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizetoArraytoArraytoBagtoListtoSettoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

SynchronizedBooleanBagback to summary
public SynchronizedBooleanBag(MutableBooleanBag bag)
SynchronizedBooleanBagback to summary
public SynchronizedBooleanBag(MutableBooleanBag bag, Object newLock)

Method Detail

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

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

Annotations
@Override
asLazyback to summary
public LazyBooleanIterable asLazy()

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

Implements org.eclipse.collections.api.BooleanIterable.asLazy.

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

Returns a LazyBooleanIterable adapter wrapping the source BooleanIterable.

Annotations
@Override
asSynchronizedback to summary
public MutableBooleanBag asSynchronized()

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableBooleanBag asUnmodifiable()

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.asUnmodifiable.

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

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

Doc from org.eclipse.collections.api.bag.primitive.MutableBooleanBag.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(BooleanToObjectFunction<? extends V> function)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.collect, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.collect.

Doc from org.eclipse.collections.api.BooleanIterable.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.BooleanBag.equals.

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

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

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

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

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

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

Annotations
@Override
getMutableBooleanBagback to summary
private MutableBooleanBag getMutableBooleanBag()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

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

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

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

Annotations
@Override
newEmptyback to summary
public MutableBooleanBag newEmpty()

Overrides default org.eclipse.collections.api.bag.primitive.MutableBooleanBag.newEmpty, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.newEmpty.

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

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

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

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

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

The occurrences of a distinct item in the bag.

Annotations
@Override
rejectback to summary
public MutableBooleanBag reject(BooleanPredicate predicate)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.reject, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.reject.

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

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

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

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

Annotations
@Override
selectback to summary
public MutableBooleanBag select(BooleanPredicate predicate)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.select, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.select.

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

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

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

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

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

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

Annotations
@Override
selectUniqueback to summary
public MutableBooleanSet selectUnique()

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

Doc from org.eclipse.collections.api.bag.primitive.MutableBooleanBag.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.BooleanBag.sizeDistinct.

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

The size of the Bag when counting only distinct elements.

Annotations
@Override
toImmutableback to summary
public ImmutableBooleanBag toImmutable()

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.toImmutable, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.toImmutable.

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

Returns an immutable copy of this bag.

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

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

Doc from org.eclipse.collections.api.bag.primitive.MutableBooleanBag.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 SynchronizedBooleanBag with(boolean element)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.with, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.with.

Annotations
@Override
withAllback to summary
public SynchronizedBooleanBag withAll(BooleanIterable elements)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.withAll, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.withAll.

Annotations
@Override
withoutback to summary
public SynchronizedBooleanBag without(boolean element)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.without, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.without.

Annotations
@Override
withoutAllback to summary
public SynchronizedBooleanBag withoutAll(BooleanIterable elements)

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

Implements org.eclipse.collections.api.bag.primitive.MutableBooleanBag.withoutAll, org.eclipse.collections.api.collection.primitive.MutableBooleanCollection.withoutAll.

Annotations
@Override