@NotThreadSafe public final class UnmodifiableIntBag extends AbstractUnmodifiableIntCollection implements com.gs.collections.api.bag.primitive.MutableIntBag
| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(int item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableIntBag |
asSynchronized() |
com.gs.collections.api.bag.primitive.MutableIntBag |
asUnmodifiable() |
<V> com.gs.collections.api.bag.MutableBag<V> |
collect(com.gs.collections.api.block.function.primitive.IntToObjectFunction<? 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.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.
|
com.gs.collections.api.bag.primitive.MutableIntBag |
reject(com.gs.collections.api.block.predicate.primitive.IntPredicate predicate) |
boolean |
removeOccurrences(int item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableIntBag |
select(com.gs.collections.api.block.predicate.primitive.IntPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
com.gs.collections.api.bag.primitive.ImmutableIntBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableIntBag |
with(int element) |
UnmodifiableIntBag |
withAll(com.gs.collections.api.IntIterable elements) |
UnmodifiableIntBag |
without(int element) |
UnmodifiableIntBag |
withoutAll(com.gs.collections.api.IntIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, getIntCollection, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, 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, toSortedListpublic UnmodifiableIntBag with(int element)
with in interface com.gs.collections.api.bag.primitive.MutableIntBagwith in interface com.gs.collections.api.collection.primitive.MutableIntCollectionwith in class AbstractUnmodifiableIntCollectionpublic UnmodifiableIntBag without(int element)
without in interface com.gs.collections.api.bag.primitive.MutableIntBagwithout in interface com.gs.collections.api.collection.primitive.MutableIntCollectionwithout in class AbstractUnmodifiableIntCollectionpublic UnmodifiableIntBag withAll(com.gs.collections.api.IntIterable elements)
withAll in interface com.gs.collections.api.bag.primitive.MutableIntBagwithAll in interface com.gs.collections.api.collection.primitive.MutableIntCollectionwithAll in class AbstractUnmodifiableIntCollectionpublic UnmodifiableIntBag withoutAll(com.gs.collections.api.IntIterable elements)
withoutAll in interface com.gs.collections.api.bag.primitive.MutableIntBagwithoutAll in interface com.gs.collections.api.collection.primitive.MutableIntCollectionwithoutAll in class AbstractUnmodifiableIntCollectionpublic void addOccurrences(int item,
int occurrences)
addOccurrences in interface com.gs.collections.api.bag.primitive.MutableIntBagpublic boolean removeOccurrences(int item,
int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.primitive.MutableIntBagpublic int sizeDistinct()
com.gs.collections.api.bag.primitive.IntBagsizeDistinct in interface com.gs.collections.api.bag.primitive.IntBagpublic int occurrencesOf(int item)
com.gs.collections.api.bag.primitive.IntBagoccurrencesOf in interface com.gs.collections.api.bag.primitive.IntBagpublic void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.IntIntProcedure procedure)
com.gs.collections.api.bag.primitive.IntBagforEachWithOccurrences in interface com.gs.collections.api.bag.primitive.IntBagpublic com.gs.collections.api.bag.primitive.MutableIntBag select(com.gs.collections.api.block.predicate.primitive.IntPredicate predicate)
select in interface com.gs.collections.api.bag.primitive.IntBagselect in interface com.gs.collections.api.bag.primitive.MutableIntBagselect in interface com.gs.collections.api.collection.primitive.MutableIntCollectionselect in interface com.gs.collections.api.IntIterableselect in class AbstractUnmodifiableIntCollectionpublic com.gs.collections.api.bag.primitive.MutableIntBag reject(com.gs.collections.api.block.predicate.primitive.IntPredicate predicate)
reject in interface com.gs.collections.api.bag.primitive.IntBagreject in interface com.gs.collections.api.bag.primitive.MutableIntBagreject in interface com.gs.collections.api.collection.primitive.MutableIntCollectionreject in interface com.gs.collections.api.IntIterablereject in class AbstractUnmodifiableIntCollectionpublic <V> com.gs.collections.api.bag.MutableBag<V> collect(com.gs.collections.api.block.function.primitive.IntToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.bag.primitive.IntBagcollect in interface com.gs.collections.api.bag.primitive.MutableIntBagcollect in interface com.gs.collections.api.collection.primitive.MutableIntCollectioncollect in interface com.gs.collections.api.IntIterablecollect in class AbstractUnmodifiableIntCollectionpublic boolean equals(java.lang.Object otherBag)
com.gs.collections.api.bag.primitive.IntBagBag.equals(Object).equals in interface com.gs.collections.api.bag.primitive.IntBagequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.bag.primitive.IntBagBag.hashCode().hashCode in interface com.gs.collections.api.bag.primitive.IntBaghashCode in class java.lang.Objectpublic com.gs.collections.api.bag.primitive.MutableIntBag asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.bag.primitive.MutableIntBagasUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableIntCollectionasUnmodifiable in class AbstractUnmodifiableIntCollectionpublic com.gs.collections.api.bag.primitive.MutableIntBag asSynchronized()
asSynchronized in interface com.gs.collections.api.bag.primitive.MutableIntBagasSynchronized in interface com.gs.collections.api.collection.primitive.MutableIntCollectionasSynchronized in class AbstractUnmodifiableIntCollectionpublic com.gs.collections.api.bag.primitive.ImmutableIntBag toImmutable()
com.gs.collections.api.bag.primitive.MutableIntBagtoImmutable in interface com.gs.collections.api.bag.primitive.IntBagtoImmutable in interface com.gs.collections.api.bag.primitive.MutableIntBagtoImmutable in interface com.gs.collections.api.collection.primitive.MutableIntCollectiontoImmutable in class AbstractUnmodifiableIntCollection