MutableShortCollection, PrimitiveIterable, ShortBag, ShortIterableShortHashBag, SynchronizedShortBag, UnmodifiableShortBagpublic interface MutableShortBag extends MutableShortCollection, ShortBag
| Modifier and Type | Method | Description |
|---|---|---|
void |
addOccurrences(short item,
int occurrences) |
|
MutableShortBag |
asSynchronized() |
|
MutableShortBag |
asUnmodifiable() |
|
MutableList<ShortIntPair> |
bottomOccurrences(int count) |
Returns the
count least frequently occurring items. |
<V> MutableBag<V> |
collect(ShortToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
default MutableShortBag |
newEmpty() |
Creates a new empty mutable version of the same Bag type.
|
MutableShortBag |
reject(ShortPredicate predicate) |
Returns a new ShortIterable with all of the elements in the ShortIterable that
return false for the specified predicate.
|
boolean |
removeOccurrences(short item,
int occurrences) |
|
MutableShortBag |
select(ShortPredicate predicate) |
Returns a new ShortIterable with all of the elements in the ShortIterable that
return true for the specified predicate.
|
MutableShortBag |
selectByOccurrences(IntPredicate predicate) |
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
default MutableShortBag |
selectDuplicates() |
Returns all elements of the bag that have more than one occurrence.
|
MutableShortSet |
selectUnique() |
Returns all elements of the bag that have exactly one occurrence.
|
default MutableShortBag |
tap(ShortProcedure procedure) |
|
ImmutableShortBag |
toImmutable() |
Returns an immutable copy of this bag.
|
MutableList<ShortIntPair> |
topOccurrences(int count) |
Returns the
count most frequently occurring items. |
MutableShortBag |
with(short element) |
|
MutableShortBag |
withAll(ShortIterable elements) |
|
MutableShortBag |
without(short element) |
|
MutableShortBag |
withoutAll(ShortIterable elements) |
add, addAll, addAll, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll, shortIteratorappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringequals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct, toStringOfItemToCountallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListvoid addOccurrences(short item,
int occurrences)
boolean removeOccurrences(short item,
int occurrences)
default MutableShortBag tap(ShortProcedure procedure)
tap in interface MutableShortCollectiontap in interface ShortBagtap in interface ShortIterableMutableShortBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface ShortBagdefault MutableShortBag selectDuplicates()
selectDuplicates in interface ShortBagMutableShortSet selectUnique()
selectUnique in interface ShortBagMutableList<ShortIntPair> topOccurrences(int count)
count most frequently occurring items.
In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last
item will be returned.topOccurrences in interface ShortBagMutableList<ShortIntPair> bottomOccurrences(int count)
count least frequently occurring items.
In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last
item will be returned.bottomOccurrences in interface ShortBagMutableShortBag select(ShortPredicate predicate)
ShortIterableselect in interface MutableShortCollectionselect in interface ShortBagselect in interface ShortIterableMutableShortBag reject(ShortPredicate predicate)
ShortIterablereject in interface MutableShortCollectionreject in interface ShortBagreject in interface ShortIterable<V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
ShortIterablecollect in interface MutableShortCollectioncollect in interface ShortBagcollect in interface ShortIterableMutableShortBag with(short element)
with in interface MutableShortCollectionMutableShortBag without(short element)
without in interface MutableShortCollectionMutableShortBag withAll(ShortIterable elements)
withAll in interface MutableShortCollectionMutableShortBag withoutAll(ShortIterable elements)
withoutAll in interface MutableShortCollectionMutableShortBag asUnmodifiable()
asUnmodifiable in interface MutableShortCollectionMutableShortBag asSynchronized()
asSynchronized in interface MutableShortCollectionImmutableShortBag toImmutable()
toImmutable in interface MutableShortCollectiontoImmutable in interface ShortBagdefault MutableShortBag newEmpty()
newEmpty in interface MutableShortCollectionCopyright © 2004–2019. All rights reserved.