@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, toStringadd, addAll, addAll, clear, intIterator, 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, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic UnmodifiableIntBag with(int element)
with in interface MutableIntBagwith in interface MutableIntCollectionwith in class AbstractUnmodifiableIntCollectionpublic UnmodifiableIntBag without(int element)
without in interface MutableIntBagwithout in interface MutableIntCollectionwithout in class AbstractUnmodifiableIntCollectionpublic UnmodifiableIntBag withAll(IntIterable elements)
withAll in interface MutableIntBagwithAll in interface MutableIntCollectionwithAll in class AbstractUnmodifiableIntCollectionpublic UnmodifiableIntBag withoutAll(IntIterable elements)
withoutAll in interface MutableIntBagwithoutAll in interface MutableIntCollectionwithoutAll in class AbstractUnmodifiableIntCollectionpublic void addOccurrences(int item,
int occurrences)
addOccurrences in interface MutableIntBagpublic boolean removeOccurrences(int item,
int occurrences)
removeOccurrences in interface MutableIntBagpublic int sizeDistinct()
IntBagsizeDistinct in interface IntBagpublic int occurrencesOf(int item)
IntBagoccurrencesOf in interface IntBagpublic void forEachWithOccurrences(IntIntProcedure procedure)
IntBagforEachWithOccurrences in interface IntBagpublic MutableIntBag select(IntPredicate predicate)
select in interface IntBagselect in interface MutableIntBagselect in interface MutableIntCollectionselect in interface IntIterableselect in class AbstractUnmodifiableIntCollectionpublic MutableIntBag reject(IntPredicate predicate)
reject in interface IntBagreject in interface MutableIntBagreject in interface MutableIntCollectionreject in interface IntIterablereject in class AbstractUnmodifiableIntCollectionpublic <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
collect in interface IntBagcollect in interface MutableIntBagcollect in interface MutableIntCollectioncollect in interface IntIterablecollect in class AbstractUnmodifiableIntCollectionpublic boolean equals(Object otherBag)
IntBagBag.equals(Object).public int hashCode()
IntBagBag.hashCode().public MutableIntBag asUnmodifiable()
asUnmodifiable in interface MutableIntBagasUnmodifiable in interface MutableIntCollectionasUnmodifiable in class AbstractUnmodifiableIntCollectionpublic MutableIntBag asSynchronized()
asSynchronized in interface MutableIntBagasSynchronized in interface MutableIntCollectionasSynchronized in class AbstractUnmodifiableIntCollectionpublic ImmutableIntBag toImmutable()
MutableIntBagtoImmutable in interface IntBagtoImmutable in interface MutableIntBagtoImmutable in interface MutableIntCollectiontoImmutable in class AbstractUnmodifiableIntCollectionCopyright © 2004–2016. All rights reserved.