@ThreadSafe public final class SynchronizedIntBag extends AbstractSynchronizedIntCollection implements com.gs.collections.api.bag.primitive.MutableIntBag
MutableIntBag. It is imperative that the user manually synchronize on the collection when iterating over it using the
IntIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveBag.stg.
MutableIntBag.asSynchronized(),
MutableBag.asSynchronized(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(int item,
int occurrences) |
com.gs.collections.api.LazyIntIterable |
asLazy() |
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.
|
SynchronizedIntBag |
with(int element) |
SynchronizedIntBag |
withAll(com.gs.collections.api.IntIterable elements) |
SynchronizedIntBag |
without(int element) |
SynchronizedIntBag |
withoutAll(com.gs.collections.api.IntIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, getIntCollection, getLock, 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, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic SynchronizedIntBag with(int element)
with in interface com.gs.collections.api.bag.primitive.MutableIntBagwith in interface com.gs.collections.api.collection.primitive.MutableIntCollectionwith in class AbstractSynchronizedIntCollectionpublic SynchronizedIntBag without(int element)
without in interface com.gs.collections.api.bag.primitive.MutableIntBagwithout in interface com.gs.collections.api.collection.primitive.MutableIntCollectionwithout in class AbstractSynchronizedIntCollectionpublic SynchronizedIntBag 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 AbstractSynchronizedIntCollectionpublic SynchronizedIntBag 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 AbstractSynchronizedIntCollectionpublic 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 AbstractSynchronizedIntCollectionpublic 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 AbstractSynchronizedIntCollectionpublic <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 AbstractSynchronizedIntCollectionpublic 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.LazyIntIterable asLazy()
asLazy in interface com.gs.collections.api.IntIterableasLazy in class AbstractSynchronizedIntCollectionpublic 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 AbstractSynchronizedIntCollectionpublic 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 AbstractSynchronizedIntCollectionpublic 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 AbstractSynchronizedIntCollection