@NotThreadSafe public final class UnmodifiableShortBag extends AbstractUnmodifiableShortCollection implements com.gs.collections.api.bag.primitive.MutableShortBag
| 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.
|
UnmodifiableShortBag |
with(short element) |
UnmodifiableShortBag |
withAll(com.gs.collections.api.ShortIterable elements) |
UnmodifiableShortBag |
without(short element) |
UnmodifiableShortBag |
withoutAll(com.gs.collections.api.ShortIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, 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 UnmodifiableShortBag with(short element)
with in interface com.gs.collections.api.bag.primitive.MutableShortBagwith in interface com.gs.collections.api.collection.primitive.MutableShortCollectionwith in class AbstractUnmodifiableShortCollectionpublic UnmodifiableShortBag without(short element)
without in interface com.gs.collections.api.bag.primitive.MutableShortBagwithout in interface com.gs.collections.api.collection.primitive.MutableShortCollectionwithout in class AbstractUnmodifiableShortCollectionpublic UnmodifiableShortBag 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 AbstractUnmodifiableShortCollectionpublic UnmodifiableShortBag 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 AbstractUnmodifiableShortCollectionpublic 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 AbstractUnmodifiableShortCollectionpublic 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 AbstractUnmodifiableShortCollectionpublic <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 AbstractUnmodifiableShortCollectionpublic 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 AbstractUnmodifiableShortCollectionpublic 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 AbstractUnmodifiableShortCollectionpublic 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 AbstractUnmodifiableShortCollectionpublic 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 AbstractUnmodifiableShortCollection