@NotThreadSafe public final class UnmodifiableCharBag extends AbstractUnmodifiableCharCollection implements MutableCharBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(char item,
int occurrences) |
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() . |
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.
|
UnmodifiableCharBag |
with(char element) |
UnmodifiableCharBag |
withAll(CharIterable elements) |
UnmodifiableCharBag |
without(char element) |
UnmodifiableCharBag |
withoutAll(CharIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, charIterator, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, 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, toString
add, addAll, addAll, charIterator, clear, remove, removeAll, removeAll, retainAll, retainAll
allSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public UnmodifiableCharBag with(char element)
with
in interface MutableCharBag
with
in interface MutableCharCollection
with
in class AbstractUnmodifiableCharCollection
public UnmodifiableCharBag without(char element)
without
in interface MutableCharBag
without
in interface MutableCharCollection
without
in class AbstractUnmodifiableCharCollection
public UnmodifiableCharBag withAll(CharIterable elements)
withAll
in interface MutableCharBag
withAll
in interface MutableCharCollection
withAll
in class AbstractUnmodifiableCharCollection
public UnmodifiableCharBag withoutAll(CharIterable elements)
withoutAll
in interface MutableCharBag
withoutAll
in interface MutableCharCollection
withoutAll
in class AbstractUnmodifiableCharCollection
public void addOccurrences(char item, int occurrences)
addOccurrences
in interface MutableCharBag
public boolean removeOccurrences(char item, int occurrences)
removeOccurrences
in interface MutableCharBag
public int sizeDistinct()
CharBag
sizeDistinct
in interface CharBag
public int occurrencesOf(char item)
CharBag
occurrencesOf
in interface CharBag
public void forEachWithOccurrences(CharIntProcedure procedure)
CharBag
forEachWithOccurrences
in interface CharBag
public MutableCharBag select(CharPredicate predicate)
select
in interface CharBag
select
in interface MutableCharBag
select
in interface CharIterable
select
in interface MutableCharCollection
select
in class AbstractUnmodifiableCharCollection
public MutableCharBag reject(CharPredicate predicate)
reject
in interface CharBag
reject
in interface MutableCharBag
reject
in interface CharIterable
reject
in interface MutableCharCollection
reject
in class AbstractUnmodifiableCharCollection
public <V> MutableBag<V> collect(CharToObjectFunction<? extends V> function)
collect
in interface CharBag
collect
in interface MutableCharBag
collect
in interface CharIterable
collect
in interface MutableCharCollection
collect
in class AbstractUnmodifiableCharCollection
public boolean equals(Object otherBag)
CharBag
Bag.equals(Object)
.public int hashCode()
CharBag
Bag.hashCode()
.public MutableCharBag asUnmodifiable()
asUnmodifiable
in interface MutableCharBag
asUnmodifiable
in interface MutableCharCollection
asUnmodifiable
in class AbstractUnmodifiableCharCollection
public MutableCharBag asSynchronized()
asSynchronized
in interface MutableCharBag
asSynchronized
in interface MutableCharCollection
asSynchronized
in class AbstractUnmodifiableCharCollection
public ImmutableCharBag toImmutable()
MutableCharBag
toImmutable
in interface CharBag
toImmutable
in interface MutableCharBag
toImmutable
in interface MutableCharCollection
toImmutable
in class AbstractUnmodifiableCharCollection
Copyright © 2004–2016. All rights reserved.