@NotThreadSafe public final class UnmodifiableIntBag extends AbstractUnmodifiableIntCollection implements MutableIntBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(int item,
int occurrences) |
MutableIntBag |
asSynchronized() |
MutableIntBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(IntToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object) . |
void |
forEachWithOccurrences(IntIntProcedure 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(int item)
The occurrences of a distinct item in the bag.
|
MutableIntBag |
reject(IntPredicate predicate) |
boolean |
removeOccurrences(int item,
int occurrences) |
MutableIntBag |
select(IntPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableIntBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableIntBag |
with(int element) |
UnmodifiableIntBag |
withAll(IntIterable elements) |
UnmodifiableIntBag |
without(int element) |
UnmodifiableIntBag |
withoutAll(IntIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, intIterator, 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, clear, intIterator, 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 UnmodifiableIntBag with(int element)
with
in interface MutableIntBag
with
in interface MutableIntCollection
with
in class AbstractUnmodifiableIntCollection
public UnmodifiableIntBag without(int element)
without
in interface MutableIntBag
without
in interface MutableIntCollection
without
in class AbstractUnmodifiableIntCollection
public UnmodifiableIntBag withAll(IntIterable elements)
withAll
in interface MutableIntBag
withAll
in interface MutableIntCollection
withAll
in class AbstractUnmodifiableIntCollection
public UnmodifiableIntBag withoutAll(IntIterable elements)
withoutAll
in interface MutableIntBag
withoutAll
in interface MutableIntCollection
withoutAll
in class AbstractUnmodifiableIntCollection
public void addOccurrences(int item, int occurrences)
addOccurrences
in interface MutableIntBag
public boolean removeOccurrences(int item, int occurrences)
removeOccurrences
in interface MutableIntBag
public int sizeDistinct()
IntBag
sizeDistinct
in interface IntBag
public int occurrencesOf(int item)
IntBag
occurrencesOf
in interface IntBag
public void forEachWithOccurrences(IntIntProcedure procedure)
IntBag
forEachWithOccurrences
in interface IntBag
public MutableIntBag select(IntPredicate predicate)
select
in interface IntBag
select
in interface MutableIntBag
select
in interface MutableIntCollection
select
in interface IntIterable
select
in class AbstractUnmodifiableIntCollection
public MutableIntBag reject(IntPredicate predicate)
reject
in interface IntBag
reject
in interface MutableIntBag
reject
in interface MutableIntCollection
reject
in interface IntIterable
reject
in class AbstractUnmodifiableIntCollection
public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
collect
in interface IntBag
collect
in interface MutableIntBag
collect
in interface MutableIntCollection
collect
in interface IntIterable
collect
in class AbstractUnmodifiableIntCollection
public boolean equals(Object otherBag)
IntBag
Bag.equals(Object)
.public int hashCode()
IntBag
Bag.hashCode()
.public MutableIntBag asUnmodifiable()
asUnmodifiable
in interface MutableIntBag
asUnmodifiable
in interface MutableIntCollection
asUnmodifiable
in class AbstractUnmodifiableIntCollection
public MutableIntBag asSynchronized()
asSynchronized
in interface MutableIntBag
asSynchronized
in interface MutableIntCollection
asSynchronized
in class AbstractUnmodifiableIntCollection
public ImmutableIntBag toImmutable()
MutableIntBag
toImmutable
in interface IntBag
toImmutable
in interface MutableIntBag
toImmutable
in interface MutableIntCollection
toImmutable
in class AbstractUnmodifiableIntCollection
Copyright © 2004–2016. All rights reserved.