@ThreadSafe public final class SynchronizedCharBag extends AbstractSynchronizedCharCollection implements 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) |
LazyCharIterable |
asLazy() |
MutableCharBag |
asSynchronized() |
MutableCharBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(CharToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(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(). |
<T> T |
injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function) |
int |
occurrencesOf(char item)
The occurrences of a distinct item in the bag.
|
MutableCharBag |
reject(CharPredicate predicate) |
boolean |
removeOccurrences(char item,
int occurrences) |
MutableCharBag |
select(CharPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableCharBag |
toImmutable()
Returns an immutable copy of this bag.
|
SynchronizedCharBag |
with(char element) |
SynchronizedCharBag |
withAll(CharIterable elements) |
SynchronizedCharBag |
without(char element) |
SynchronizedCharBag |
withoutAll(CharIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, charIterator, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringadd, addAll, addAll, clear, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, charIterator, contains, containsAll, containsAll, count, detectIfNone, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic SynchronizedCharBag with(char element)
with in interface MutableCharBagwith in interface MutableCharCollectionwith in class AbstractSynchronizedCharCollectionpublic SynchronizedCharBag without(char element)
without in interface MutableCharBagwithout in interface MutableCharCollectionwithout in class AbstractSynchronizedCharCollectionpublic SynchronizedCharBag withAll(CharIterable elements)
withAll in interface MutableCharBagwithAll in interface MutableCharCollectionwithAll in class AbstractSynchronizedCharCollectionpublic SynchronizedCharBag withoutAll(CharIterable elements)
withoutAll in interface MutableCharBagwithoutAll in interface MutableCharCollectionwithoutAll in class AbstractSynchronizedCharCollectionpublic void addOccurrences(char item,
int occurrences)
addOccurrences in interface MutableCharBagpublic boolean removeOccurrences(char item,
int occurrences)
removeOccurrences in interface MutableCharBagpublic int sizeDistinct()
CharBagsizeDistinct in interface CharBagpublic int occurrencesOf(char item)
CharBagoccurrencesOf in interface CharBagpublic void forEachWithOccurrences(CharIntProcedure procedure)
CharBagforEachWithOccurrences in interface CharBagpublic MutableCharBag select(CharPredicate predicate)
select in interface CharBagselect in interface MutableCharBagselect in interface CharIterableselect in interface MutableCharCollectionselect in class AbstractSynchronizedCharCollectionpublic MutableCharBag reject(CharPredicate predicate)
reject in interface CharBagreject in interface MutableCharBagreject in interface CharIterablereject in interface MutableCharCollectionreject in class AbstractSynchronizedCharCollectionpublic <V> MutableBag<V> collect(CharToObjectFunction<? extends V> function)
collect in interface CharBagcollect in interface MutableCharBagcollect in interface CharIterablecollect in interface MutableCharCollectioncollect in class AbstractSynchronizedCharCollectionpublic boolean equals(Object otherBag)
CharBagBag.equals(Object).public int hashCode()
CharBagBag.hashCode().public LazyCharIterable asLazy()
asLazy in interface CharIterableasLazy in class AbstractSynchronizedCharCollectionpublic MutableCharBag asUnmodifiable()
asUnmodifiable in interface MutableCharBagasUnmodifiable in interface MutableCharCollectionasUnmodifiable in class AbstractSynchronizedCharCollectionpublic MutableCharBag asSynchronized()
asSynchronized in interface MutableCharBagasSynchronized in interface MutableCharCollectionasSynchronized in class AbstractSynchronizedCharCollectionpublic ImmutableCharBag toImmutable()
MutableCharBagtoImmutable in interface CharBagtoImmutable in interface MutableCharBagtoImmutable in interface MutableCharCollectiontoImmutable in class AbstractSynchronizedCharCollectionpublic <T> T injectInto(T injectedValue,
ObjectCharToObjectFunction<? super T,? extends T> function)
injectInto in interface CharIterableinjectInto in class AbstractSynchronizedCharCollectionCopyright © 2004–2017. All rights reserved.