@ThreadSafe public final class SynchronizedShortBag extends AbstractSynchronizedShortCollection implements 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) |
LazyShortIterable |
asLazy() |
MutableShortBag |
asSynchronized() |
MutableShortBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(ShortToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(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(). |
<T> T |
injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function) |
int |
occurrencesOf(short item)
The occurrences of a distinct item in the bag.
|
MutableShortBag |
reject(ShortPredicate predicate) |
boolean |
removeOccurrences(short item,
int occurrences) |
MutableShortBag |
select(ShortPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableShortBag |
toImmutable()
Returns an immutable copy of this bag.
|
SynchronizedShortBag |
with(short element) |
SynchronizedShortBag |
withAll(ShortIterable elements) |
SynchronizedShortBag |
without(short element) |
SynchronizedShortBag |
withoutAll(ShortIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, shortIterator, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringadd, addAll, addAll, clear, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, shortIterator, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic SynchronizedShortBag with(short element)
with in interface MutableShortBagwith in interface MutableShortCollectionwith in class AbstractSynchronizedShortCollectionpublic SynchronizedShortBag without(short element)
without in interface MutableShortBagwithout in interface MutableShortCollectionwithout in class AbstractSynchronizedShortCollectionpublic SynchronizedShortBag withAll(ShortIterable elements)
withAll in interface MutableShortBagwithAll in interface MutableShortCollectionwithAll in class AbstractSynchronizedShortCollectionpublic SynchronizedShortBag withoutAll(ShortIterable elements)
withoutAll in interface MutableShortBagwithoutAll in interface MutableShortCollectionwithoutAll in class AbstractSynchronizedShortCollectionpublic void addOccurrences(short item,
int occurrences)
addOccurrences in interface MutableShortBagpublic boolean removeOccurrences(short item,
int occurrences)
removeOccurrences in interface MutableShortBagpublic int sizeDistinct()
ShortBagsizeDistinct in interface ShortBagpublic int occurrencesOf(short item)
ShortBagoccurrencesOf in interface ShortBagpublic void forEachWithOccurrences(ShortIntProcedure procedure)
ShortBagforEachWithOccurrences in interface ShortBagpublic MutableShortBag select(ShortPredicate predicate)
select in interface MutableShortBagselect in interface ShortBagselect in interface MutableShortCollectionselect in interface ShortIterableselect in class AbstractSynchronizedShortCollectionpublic MutableShortBag reject(ShortPredicate predicate)
reject in interface MutableShortBagreject in interface ShortBagreject in interface MutableShortCollectionreject in interface ShortIterablereject in class AbstractSynchronizedShortCollectionpublic <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
collect in interface MutableShortBagcollect in interface ShortBagcollect in interface MutableShortCollectioncollect in interface ShortIterablecollect in class AbstractSynchronizedShortCollectionpublic boolean equals(Object otherBag)
ShortBagBag.equals(Object).public int hashCode()
ShortBagBag.hashCode().public LazyShortIterable asLazy()
asLazy in interface ShortIterableasLazy in class AbstractSynchronizedShortCollectionpublic MutableShortBag asUnmodifiable()
asUnmodifiable in interface MutableShortBagasUnmodifiable in interface MutableShortCollectionasUnmodifiable in class AbstractSynchronizedShortCollectionpublic MutableShortBag asSynchronized()
asSynchronized in interface MutableShortBagasSynchronized in interface MutableShortCollectionasSynchronized in class AbstractSynchronizedShortCollectionpublic ImmutableShortBag toImmutable()
MutableShortBagtoImmutable in interface MutableShortBagtoImmutable in interface ShortBagtoImmutable in interface MutableShortCollectiontoImmutable in class AbstractSynchronizedShortCollectionpublic <T> T injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterableinjectInto in class AbstractSynchronizedShortCollectionCopyright © 2004–2017. All rights reserved.