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

public Class SynchronizedCharBag

extends AbstractSynchronizedCharCollection
implements MutableCharBag
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.primitive.MutableCharBag, org.eclipse.collections.api.bag.primitive.CharBag, org.eclipse.collections.api.CharIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableCharCollection
Imports
java.util.Collection, .Collections, org.eclipse.collections.api.CharIterable, .LazyCharIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.ImmutableCharBag, .MutableCharBag, org.eclipse.collections.api.block.function.primitive.CharToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .CharPredicate, org.eclipse.collections.api.block.procedure.primitive.CharIntProcedure, org.eclipse.collections.api.iterator.CharIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.CharIntPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedCharCollection, org.eclipse.collections.impl.factory.primitive.CharBags, org.eclipse.collections.impl.lazy.primitive.LazyCharIterableAdapter, org.eclipse.collections.api.set.primitive.MutableCharSet

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

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

Since
3.1.
See Also
MutableCharBag#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 LazyCharIterable
public MutableCharBag
public MutableCharBag
public MutableList<CharIntPair>
bottomOccurrences(int count)

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

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

public void
forEachWithOccurrences(CharIntProcedure procedure)

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

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

private MutableCharBag
public int
public MutableCharBag
public int
occurrencesOf(char item)

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

The occurrences of a distinct item in the bag.

public MutableCharBag
public boolean
public MutableCharBag
public MutableCharBag
selectByOccurrences(IntPredicate predicate)

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

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

public MutableCharSet
selectUnique()

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

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

public int
sizeDistinct()

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

The size of the Bag when counting only distinct elements.

public ImmutableCharBag
public MutableList<CharIntPair>
topOccurrences(int count)

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

Returns the count most frequently occurring items.

public SynchronizedCharBag
public SynchronizedCharBag
public SynchronizedCharBag
public SynchronizedCharBag
Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedCharCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringaveragecharIteratorchunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachgetCharCollectiongetLockinjectIntoisEmptymakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

SynchronizedCharBagback to summary
public SynchronizedCharBag(MutableCharBag bag)
SynchronizedCharBagback to summary
public SynchronizedCharBag(MutableCharBag bag, Object newLock)

Method Detail

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

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

Annotations
@Override
asLazyback to summary
public LazyCharIterable asLazy()

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

Implements org.eclipse.collections.api.CharIterable.asLazy.

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

Returns a LazyCharIterable adapter wrapping the source CharIterable.

Annotations
@Override
asSynchronizedback to summary
public MutableCharBag asSynchronized()

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableCharCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableCharBag asUnmodifiable()

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableCharCollection.asUnmodifiable.

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

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

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

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.collect, org.eclipse.collections.api.collection.primitive.MutableCharCollection.collect.

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

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

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

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

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

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

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

Annotations
@Override
getMutableCharBagback to summary
private MutableCharBag getMutableCharBag()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

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

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

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

Annotations
@Override
newEmptyback to summary
public MutableCharBag newEmpty()

Overrides default org.eclipse.collections.api.bag.primitive.MutableCharBag.newEmpty, org.eclipse.collections.api.collection.primitive.MutableCharCollection.newEmpty.

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

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

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

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

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

The occurrences of a distinct item in the bag.

Annotations
@Override
rejectback to summary
public MutableCharBag reject(CharPredicate predicate)

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.reject, org.eclipse.collections.api.collection.primitive.MutableCharCollection.reject.

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

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

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

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

Annotations
@Override
selectback to summary
public MutableCharBag select(CharPredicate predicate)

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.select, org.eclipse.collections.api.collection.primitive.MutableCharCollection.select.

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

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

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

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

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

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

Annotations
@Override
selectUniqueback to summary
public MutableCharSet selectUnique()

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

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

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

The size of the Bag when counting only distinct elements.

Annotations
@Override
toImmutableback to summary
public ImmutableCharBag toImmutable()

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.toImmutable, org.eclipse.collections.api.collection.primitive.MutableCharCollection.toImmutable.

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

Returns an immutable copy of this bag.

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

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

Doc from org.eclipse.collections.api.bag.primitive.MutableCharBag.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 SynchronizedCharBag with(char element)

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.with, org.eclipse.collections.api.collection.primitive.MutableCharCollection.with.

Annotations
@Override
withAllback to summary
public SynchronizedCharBag withAll(CharIterable elements)

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.withAll, org.eclipse.collections.api.collection.primitive.MutableCharCollection.withAll.

Annotations
@Override
withoutback to summary
public SynchronizedCharBag without(char element)

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.without, org.eclipse.collections.api.collection.primitive.MutableCharCollection.without.

Annotations
@Override
withoutAllback to summary
public SynchronizedCharBag withoutAll(CharIterable elements)

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

Implements org.eclipse.collections.api.bag.primitive.MutableCharBag.withoutAll, org.eclipse.collections.api.collection.primitive.MutableCharCollection.withoutAll.

Annotations
@Override