@ThreadSafe public final class SynchronizedShortBag extends AbstractSynchronizedShortCollection implements com.gs.collections.api.bag.primitive.MutableShortBag
MutableShortBag. It is imperative that the user manually synchronize on the collection when iterating over it using the
ShortIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveBag.stg.
MutableShortBag.asSynchronized(),
MutableBag.asSynchronized(),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(short item,
int occurrences) |
com.gs.collections.api.LazyShortIterable |
asLazy() |
com.gs.collections.api.bag.primitive.MutableShortBag |
asSynchronized() |
com.gs.collections.api.bag.primitive.MutableShortBag |
asUnmodifiable() |
<V> com.gs.collections.api.bag.MutableBag<V> |
collect(com.gs.collections.api.block.function.primitive.ShortToObjectFunction<? 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.ShortIntProcedure 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(short item)
The occurrences of a distinct item in the bag.
|
com.gs.collections.api.bag.primitive.MutableShortBag |
reject(com.gs.collections.api.block.predicate.primitive.ShortPredicate predicate) |
boolean |
removeOccurrences(short item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableShortBag |
select(com.gs.collections.api.block.predicate.primitive.ShortPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
com.gs.collections.api.bag.primitive.ImmutableShortBag |
toImmutable()
Returns an immutable copy of this bag.
|
SynchronizedShortBag |
with(short element) |
SynchronizedShortBag |
withAll(com.gs.collections.api.ShortIterable elements) |
SynchronizedShortBag |
without(short element) |
SynchronizedShortBag |
withoutAll(com.gs.collections.api.ShortIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, getLock, getShortCollection, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, shortIterator, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, remove, removeAll, removeAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, shortIterator, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic SynchronizedShortBag with(short element)
with in interface com.gs.collections.api.bag.primitive.MutableShortBagwith in interface com.gs.collections.api.collection.primitive.MutableShortCollectionwith in class AbstractSynchronizedShortCollectionpublic SynchronizedShortBag without(short element)
without in interface com.gs.collections.api.bag.primitive.MutableShortBagwithout in interface com.gs.collections.api.collection.primitive.MutableShortCollectionwithout in class AbstractSynchronizedShortCollectionpublic SynchronizedShortBag withAll(com.gs.collections.api.ShortIterable elements)
withAll in interface com.gs.collections.api.bag.primitive.MutableShortBagwithAll in interface com.gs.collections.api.collection.primitive.MutableShortCollectionwithAll in class AbstractSynchronizedShortCollectionpublic SynchronizedShortBag withoutAll(com.gs.collections.api.ShortIterable elements)
withoutAll in interface com.gs.collections.api.bag.primitive.MutableShortBagwithoutAll in interface com.gs.collections.api.collection.primitive.MutableShortCollectionwithoutAll in class AbstractSynchronizedShortCollectionpublic void addOccurrences(short item,
int occurrences)
addOccurrences in interface com.gs.collections.api.bag.primitive.MutableShortBagpublic boolean removeOccurrences(short item,
int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.primitive.MutableShortBagpublic int sizeDistinct()
com.gs.collections.api.bag.primitive.ShortBagsizeDistinct in interface com.gs.collections.api.bag.primitive.ShortBagpublic int occurrencesOf(short item)
com.gs.collections.api.bag.primitive.ShortBagoccurrencesOf in interface com.gs.collections.api.bag.primitive.ShortBagpublic void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.ShortIntProcedure procedure)
com.gs.collections.api.bag.primitive.ShortBagforEachWithOccurrences in interface com.gs.collections.api.bag.primitive.ShortBagpublic com.gs.collections.api.bag.primitive.MutableShortBag select(com.gs.collections.api.block.predicate.primitive.ShortPredicate predicate)
select in interface com.gs.collections.api.bag.primitive.MutableShortBagselect in interface com.gs.collections.api.bag.primitive.ShortBagselect in interface com.gs.collections.api.collection.primitive.MutableShortCollectionselect in interface com.gs.collections.api.ShortIterableselect in class AbstractSynchronizedShortCollectionpublic com.gs.collections.api.bag.primitive.MutableShortBag reject(com.gs.collections.api.block.predicate.primitive.ShortPredicate predicate)
reject in interface com.gs.collections.api.bag.primitive.MutableShortBagreject in interface com.gs.collections.api.bag.primitive.ShortBagreject in interface com.gs.collections.api.collection.primitive.MutableShortCollectionreject in interface com.gs.collections.api.ShortIterablereject in class AbstractSynchronizedShortCollectionpublic <V> com.gs.collections.api.bag.MutableBag<V> collect(com.gs.collections.api.block.function.primitive.ShortToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.bag.primitive.MutableShortBagcollect in interface com.gs.collections.api.bag.primitive.ShortBagcollect in interface com.gs.collections.api.collection.primitive.MutableShortCollectioncollect in interface com.gs.collections.api.ShortIterablecollect in class AbstractSynchronizedShortCollectionpublic boolean equals(java.lang.Object otherBag)
com.gs.collections.api.bag.primitive.ShortBagBag.equals(Object).equals in interface com.gs.collections.api.bag.primitive.ShortBagequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.bag.primitive.ShortBagBag.hashCode().hashCode in interface com.gs.collections.api.bag.primitive.ShortBaghashCode in class java.lang.Objectpublic com.gs.collections.api.LazyShortIterable asLazy()
asLazy in interface com.gs.collections.api.ShortIterableasLazy in class AbstractSynchronizedShortCollectionpublic com.gs.collections.api.bag.primitive.MutableShortBag asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.bag.primitive.MutableShortBagasUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableShortCollectionasUnmodifiable in class AbstractSynchronizedShortCollectionpublic com.gs.collections.api.bag.primitive.MutableShortBag asSynchronized()
asSynchronized in interface com.gs.collections.api.bag.primitive.MutableShortBagasSynchronized in interface com.gs.collections.api.collection.primitive.MutableShortCollectionasSynchronized in class AbstractSynchronizedShortCollectionpublic com.gs.collections.api.bag.primitive.ImmutableShortBag toImmutable()
com.gs.collections.api.bag.primitive.MutableShortBagtoImmutable in interface com.gs.collections.api.bag.primitive.MutableShortBagtoImmutable in interface com.gs.collections.api.bag.primitive.ShortBagtoImmutable in interface com.gs.collections.api.collection.primitive.MutableShortCollectiontoImmutable in class AbstractSynchronizedShortCollection