@ThreadSafe public final class SynchronizedCharBag extends AbstractSynchronizedCharCollection implements com.gs.collections.api.bag.primitive.MutableCharBag
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.
MutableCharBag.asSynchronized(),
MutableBag.asSynchronized(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(char item,
int occurrences) |
com.gs.collections.api.LazyCharIterable |
asLazy() |
com.gs.collections.api.bag.primitive.MutableCharBag |
asSynchronized() |
com.gs.collections.api.bag.primitive.MutableCharBag |
asUnmodifiable() |
<V> com.gs.collections.api.bag.MutableBag<V> |
collect(com.gs.collections.api.block.function.primitive.CharToObjectFunction<? extends V> function) |
boolean |
equals(java.lang.Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.CharIntProcedure procedure)
For each distinct item, with the number of occurrences, execute the specified procedure.
|
int |
hashCode()
Follows the same general contract as
Bag.hashCode(). |
int |
occurrencesOf(char item)
The occurrences of a distinct item in the bag.
|
com.gs.collections.api.bag.primitive.MutableCharBag |
reject(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
boolean |
removeOccurrences(char item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableCharBag |
select(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
com.gs.collections.api.bag.primitive.ImmutableCharBag |
toImmutable()
Returns an immutable copy of this bag.
|
SynchronizedCharBag |
with(char element) |
SynchronizedCharBag |
withAll(com.gs.collections.api.CharIterable elements) |
SynchronizedCharBag |
without(char element) |
SynchronizedCharBag |
withoutAll(com.gs.collections.api.CharIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, charIterator, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, getCharCollection, getLock, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, charIterator, clear, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic SynchronizedCharBag with(char element)
with in interface com.gs.collections.api.bag.primitive.MutableCharBagwith in interface com.gs.collections.api.collection.primitive.MutableCharCollectionwith in class AbstractSynchronizedCharCollectionpublic SynchronizedCharBag without(char element)
without in interface com.gs.collections.api.bag.primitive.MutableCharBagwithout in interface com.gs.collections.api.collection.primitive.MutableCharCollectionwithout in class AbstractSynchronizedCharCollectionpublic SynchronizedCharBag withAll(com.gs.collections.api.CharIterable elements)
withAll in interface com.gs.collections.api.bag.primitive.MutableCharBagwithAll in interface com.gs.collections.api.collection.primitive.MutableCharCollectionwithAll in class AbstractSynchronizedCharCollectionpublic SynchronizedCharBag withoutAll(com.gs.collections.api.CharIterable elements)
withoutAll in interface com.gs.collections.api.bag.primitive.MutableCharBagwithoutAll in interface com.gs.collections.api.collection.primitive.MutableCharCollectionwithoutAll in class AbstractSynchronizedCharCollectionpublic void addOccurrences(char item,
int occurrences)
addOccurrences in interface com.gs.collections.api.bag.primitive.MutableCharBagpublic boolean removeOccurrences(char item,
int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.primitive.MutableCharBagpublic int sizeDistinct()
com.gs.collections.api.bag.primitive.CharBagsizeDistinct in interface com.gs.collections.api.bag.primitive.CharBagpublic int occurrencesOf(char item)
com.gs.collections.api.bag.primitive.CharBagoccurrencesOf in interface com.gs.collections.api.bag.primitive.CharBagpublic void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.CharIntProcedure procedure)
com.gs.collections.api.bag.primitive.CharBagforEachWithOccurrences in interface com.gs.collections.api.bag.primitive.CharBagpublic com.gs.collections.api.bag.primitive.MutableCharBag select(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
select in interface com.gs.collections.api.bag.primitive.CharBagselect in interface com.gs.collections.api.bag.primitive.MutableCharBagselect in interface com.gs.collections.api.CharIterableselect in interface com.gs.collections.api.collection.primitive.MutableCharCollectionselect in class AbstractSynchronizedCharCollectionpublic com.gs.collections.api.bag.primitive.MutableCharBag reject(com.gs.collections.api.block.predicate.primitive.CharPredicate predicate)
reject in interface com.gs.collections.api.bag.primitive.CharBagreject in interface com.gs.collections.api.bag.primitive.MutableCharBagreject in interface com.gs.collections.api.CharIterablereject in interface com.gs.collections.api.collection.primitive.MutableCharCollectionreject in class AbstractSynchronizedCharCollectionpublic <V> com.gs.collections.api.bag.MutableBag<V> collect(com.gs.collections.api.block.function.primitive.CharToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.bag.primitive.CharBagcollect in interface com.gs.collections.api.bag.primitive.MutableCharBagcollect in interface com.gs.collections.api.CharIterablecollect in interface com.gs.collections.api.collection.primitive.MutableCharCollectioncollect in class AbstractSynchronizedCharCollectionpublic boolean equals(java.lang.Object otherBag)
com.gs.collections.api.bag.primitive.CharBagBag.equals(Object).equals in interface com.gs.collections.api.bag.primitive.CharBagequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.bag.primitive.CharBagBag.hashCode().hashCode in interface com.gs.collections.api.bag.primitive.CharBaghashCode in class java.lang.Objectpublic com.gs.collections.api.LazyCharIterable asLazy()
asLazy in interface com.gs.collections.api.CharIterableasLazy in class AbstractSynchronizedCharCollectionpublic com.gs.collections.api.bag.primitive.MutableCharBag asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.bag.primitive.MutableCharBagasUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableCharCollectionasUnmodifiable in class AbstractSynchronizedCharCollectionpublic com.gs.collections.api.bag.primitive.MutableCharBag asSynchronized()
asSynchronized in interface com.gs.collections.api.bag.primitive.MutableCharBagasSynchronized in interface com.gs.collections.api.collection.primitive.MutableCharCollectionasSynchronized in class AbstractSynchronizedCharCollectionpublic com.gs.collections.api.bag.primitive.ImmutableCharBag toImmutable()
com.gs.collections.api.bag.primitive.MutableCharBagtoImmutable in interface com.gs.collections.api.bag.primitive.CharBagtoImmutable in interface com.gs.collections.api.bag.primitive.MutableCharBagtoImmutable in interface com.gs.collections.api.collection.primitive.MutableCharCollectiontoImmutable in class AbstractSynchronizedCharCollection