@NotThreadSafe public final class UnmodifiableBooleanBag extends AbstractUnmodifiableBooleanCollection implements MutableBooleanBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(boolean item,
int occurrences) |
MutableBooleanBag |
asSynchronized() |
MutableBooleanBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(BooleanToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object) . |
void |
forEachWithOccurrences(BooleanIntProcedure 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(boolean item)
The occurrences of a distinct item in the bag.
|
MutableBooleanBag |
reject(BooleanPredicate predicate) |
boolean |
removeOccurrences(boolean item,
int occurrences) |
MutableBooleanBag |
select(BooleanPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableBooleanBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableBooleanBag |
with(boolean element) |
UnmodifiableBooleanBag |
withAll(BooleanIterable elements) |
UnmodifiableBooleanBag |
without(boolean element) |
UnmodifiableBooleanBag |
withoutAll(BooleanIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, booleanIterator, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, toArray, toBag, toList, toSet, toString
add, addAll, addAll, booleanIterator, clear, remove, removeAll, removeAll, retainAll, retainAll
allSatisfy, anySatisfy, asLazy, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, noneSatisfy, toArray, toBag, toList, toSet
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public UnmodifiableBooleanBag with(boolean element)
with
in interface MutableBooleanBag
with
in interface MutableBooleanCollection
with
in class AbstractUnmodifiableBooleanCollection
public UnmodifiableBooleanBag without(boolean element)
without
in interface MutableBooleanBag
without
in interface MutableBooleanCollection
without
in class AbstractUnmodifiableBooleanCollection
public UnmodifiableBooleanBag withAll(BooleanIterable elements)
withAll
in interface MutableBooleanBag
withAll
in interface MutableBooleanCollection
withAll
in class AbstractUnmodifiableBooleanCollection
public UnmodifiableBooleanBag withoutAll(BooleanIterable elements)
withoutAll
in interface MutableBooleanBag
withoutAll
in interface MutableBooleanCollection
withoutAll
in class AbstractUnmodifiableBooleanCollection
public void addOccurrences(boolean item, int occurrences)
addOccurrences
in interface MutableBooleanBag
public boolean removeOccurrences(boolean item, int occurrences)
removeOccurrences
in interface MutableBooleanBag
public int sizeDistinct()
BooleanBag
sizeDistinct
in interface BooleanBag
public int occurrencesOf(boolean item)
BooleanBag
occurrencesOf
in interface BooleanBag
public void forEachWithOccurrences(BooleanIntProcedure procedure)
BooleanBag
forEachWithOccurrences
in interface BooleanBag
public MutableBooleanBag select(BooleanPredicate predicate)
select
in interface BooleanBag
select
in interface MutableBooleanBag
select
in interface BooleanIterable
select
in interface MutableBooleanCollection
select
in class AbstractUnmodifiableBooleanCollection
public MutableBooleanBag reject(BooleanPredicate predicate)
reject
in interface BooleanBag
reject
in interface MutableBooleanBag
reject
in interface BooleanIterable
reject
in interface MutableBooleanCollection
reject
in class AbstractUnmodifiableBooleanCollection
public <V> MutableBag<V> collect(BooleanToObjectFunction<? extends V> function)
collect
in interface BooleanBag
collect
in interface MutableBooleanBag
collect
in interface BooleanIterable
collect
in interface MutableBooleanCollection
collect
in class AbstractUnmodifiableBooleanCollection
public boolean equals(Object otherBag)
BooleanBag
Bag.equals(Object)
.equals
in interface BooleanBag
equals
in class Object
public int hashCode()
BooleanBag
Bag.hashCode()
.hashCode
in interface BooleanBag
hashCode
in class Object
public MutableBooleanBag asUnmodifiable()
asUnmodifiable
in interface MutableBooleanBag
asUnmodifiable
in interface MutableBooleanCollection
asUnmodifiable
in class AbstractUnmodifiableBooleanCollection
public MutableBooleanBag asSynchronized()
asSynchronized
in interface MutableBooleanBag
asSynchronized
in interface MutableBooleanCollection
asSynchronized
in class AbstractUnmodifiableBooleanCollection
public ImmutableBooleanBag toImmutable()
MutableBooleanBag
toImmutable
in interface BooleanBag
toImmutable
in interface MutableBooleanBag
toImmutable
in interface MutableBooleanCollection
toImmutable
in class AbstractUnmodifiableBooleanCollection
Copyright © 2004–2016. All rights reserved.