@NotThreadSafe public final class UnmodifiableCharBag extends AbstractUnmodifiableCharCollection implements com.gs.collections.api.bag.primitive.MutableCharBag
| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(char item,
int occurrences) |
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.
|
UnmodifiableCharBag |
with(char element) |
UnmodifiableCharBag |
withAll(com.gs.collections.api.CharIterable elements) |
UnmodifiableCharBag |
without(char element) |
UnmodifiableCharBag |
withoutAll(com.gs.collections.api.CharIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, charIterator, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, getCharCollection, 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, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic UnmodifiableCharBag with(char element)
with in interface com.gs.collections.api.bag.primitive.MutableCharBagwith in interface com.gs.collections.api.collection.primitive.MutableCharCollectionwith in class AbstractUnmodifiableCharCollectionpublic UnmodifiableCharBag without(char element)
without in interface com.gs.collections.api.bag.primitive.MutableCharBagwithout in interface com.gs.collections.api.collection.primitive.MutableCharCollectionwithout in class AbstractUnmodifiableCharCollectionpublic UnmodifiableCharBag 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 AbstractUnmodifiableCharCollectionpublic UnmodifiableCharBag 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 AbstractUnmodifiableCharCollectionpublic 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 AbstractUnmodifiableCharCollectionpublic 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 AbstractUnmodifiableCharCollectionpublic <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 AbstractUnmodifiableCharCollectionpublic 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.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 AbstractUnmodifiableCharCollectionpublic 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 AbstractUnmodifiableCharCollectionpublic 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 AbstractUnmodifiableCharCollection