Class SynchronizedCharBag
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedCharCollection
-
- org.eclipse.collections.impl.bag.mutable.primitive.SynchronizedCharBag
-
- All Implemented Interfaces:
Serializable
,CharBag
,MutableCharBag
,CharIterable
,MutableCharCollection
,PrimitiveIterable
public class SynchronizedCharBag extends AbstractSynchronizedCharCollection implements MutableCharBag
A synchronized view of aMutableCharBag
. It is imperative that the user manually synchronize on the collection when iterating over it using theCharIterator
, as perCollections.synchronizedCollection(Collection)
.This file was automatically generated from template file synchronizedPrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
MutableCharBag.asSynchronized()
,MutableBag.asSynchronized()
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SynchronizedCharBag(MutableCharBag bag)
SynchronizedCharBag(MutableCharBag bag, Object newLock)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedCharCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, charIterator, 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.CharBag
toStringOfItemToCount
-
Methods inherited from interface org.eclipse.collections.api.CharIterable
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.MutableCharBag
selectDuplicates, tap
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableCharCollection
add, addAll, addAll, charIterator, 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
-
SynchronizedCharBag
public SynchronizedCharBag(MutableCharBag bag)
-
SynchronizedCharBag
public SynchronizedCharBag(MutableCharBag bag, Object newLock)
-
-
Method Detail
-
with
public SynchronizedCharBag with(char element)
- Specified by:
with
in interfaceMutableCharBag
- Specified by:
with
in interfaceMutableCharCollection
- Overrides:
with
in classAbstractSynchronizedCharCollection
-
without
public SynchronizedCharBag without(char element)
- Specified by:
without
in interfaceMutableCharBag
- Specified by:
without
in interfaceMutableCharCollection
- Overrides:
without
in classAbstractSynchronizedCharCollection
-
withAll
public SynchronizedCharBag withAll(CharIterable elements)
- Specified by:
withAll
in interfaceMutableCharBag
- Specified by:
withAll
in interfaceMutableCharCollection
- Overrides:
withAll
in classAbstractSynchronizedCharCollection
-
withoutAll
public SynchronizedCharBag withoutAll(CharIterable elements)
- Specified by:
withoutAll
in interfaceMutableCharBag
- Specified by:
withoutAll
in interfaceMutableCharCollection
- Overrides:
withoutAll
in classAbstractSynchronizedCharCollection
-
addOccurrences
public void addOccurrences(char item, int occurrences)
- Specified by:
addOccurrences
in interfaceMutableCharBag
-
removeOccurrences
public boolean removeOccurrences(char item, int occurrences)
- Specified by:
removeOccurrences
in interfaceMutableCharBag
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinct
in interfaceCharBag
-
occurrencesOf
public int occurrencesOf(char item)
- Specified by:
occurrencesOf
in interfaceCharBag
-
forEachWithOccurrences
public void forEachWithOccurrences(CharIntProcedure procedure)
- Specified by:
forEachWithOccurrences
in interfaceCharBag
-
select
public MutableCharBag select(CharPredicate predicate)
- Specified by:
select
in interfaceCharBag
- Specified by:
select
in interfaceCharIterable
- Specified by:
select
in interfaceMutableCharBag
- Specified by:
select
in interfaceMutableCharCollection
- Overrides:
select
in classAbstractSynchronizedCharCollection
-
selectByOccurrences
public MutableCharBag selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrences
in interfaceCharBag
- Specified by:
selectByOccurrences
in interfaceMutableCharBag
-
selectUnique
public MutableCharSet selectUnique()
- Specified by:
selectUnique
in interfaceCharBag
- Specified by:
selectUnique
in interfaceMutableCharBag
-
topOccurrences
public MutableList<CharIntPair> topOccurrences(int count)
- Specified by:
topOccurrences
in interfaceCharBag
- Specified by:
topOccurrences
in interfaceMutableCharBag
-
bottomOccurrences
public MutableList<CharIntPair> bottomOccurrences(int count)
- Specified by:
bottomOccurrences
in interfaceCharBag
- Specified by:
bottomOccurrences
in interfaceMutableCharBag
-
reject
public MutableCharBag reject(CharPredicate predicate)
- Specified by:
reject
in interfaceCharBag
- Specified by:
reject
in interfaceCharIterable
- Specified by:
reject
in interfaceMutableCharBag
- Specified by:
reject
in interfaceMutableCharCollection
- Overrides:
reject
in classAbstractSynchronizedCharCollection
-
collect
public <V> MutableBag<V> collect(CharToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceCharBag
- Specified by:
collect
in interfaceCharIterable
- Specified by:
collect
in interfaceMutableCharBag
- Specified by:
collect
in interfaceMutableCharCollection
- Overrides:
collect
in classAbstractSynchronizedCharCollection
-
equals
public boolean equals(Object otherBag)
-
hashCode
public int hashCode()
-
asLazy
public LazyCharIterable asLazy()
- Specified by:
asLazy
in interfaceCharIterable
- Overrides:
asLazy
in classAbstractSynchronizedCharCollection
-
asUnmodifiable
public MutableCharBag asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableCharBag
- Specified by:
asUnmodifiable
in interfaceMutableCharCollection
- Overrides:
asUnmodifiable
in classAbstractSynchronizedCharCollection
-
asSynchronized
public MutableCharBag asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableCharBag
- Specified by:
asSynchronized
in interfaceMutableCharCollection
- Overrides:
asSynchronized
in classAbstractSynchronizedCharCollection
-
toImmutable
public ImmutableCharBag toImmutable()
- Specified by:
toImmutable
in interfaceCharBag
- Specified by:
toImmutable
in interfaceMutableCharBag
- Specified by:
toImmutable
in interfaceMutableCharCollection
- Overrides:
toImmutable
in classAbstractSynchronizedCharCollection
-
newEmpty
public MutableCharBag newEmpty()
- Specified by:
newEmpty
in interfaceMutableCharBag
- Specified by:
newEmpty
in interfaceMutableCharCollection
- Since:
- 9.2.
-
-