public interface MutableShortBag extends MutableShortCollection, ShortBag
| Modifier and Type | Method and 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.
|
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 |
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, retainAll, retainAll, shortIteratorequals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinctallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, 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, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringvoid 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 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 ShortBagCopyright © 2004–2017. All rights reserved.