MutableShortCollection
, PrimitiveIterable
, ShortBag
, ShortIterable
ShortHashBag
, SynchronizedShortBag
, UnmodifiableShortBag
public 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, shortIterator
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
equals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct, toStringOfItemToCount
allSatisfy, 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, toSortedList
void addOccurrences(short item, int occurrences)
boolean removeOccurrences(short item, int occurrences)
default MutableShortBag tap(ShortProcedure procedure)
tap
in interface MutableShortCollection
tap
in interface ShortBag
tap
in interface ShortIterable
MutableShortBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences
in interface ShortBag
default MutableShortBag selectDuplicates()
selectDuplicates
in interface ShortBag
MutableShortSet selectUnique()
selectUnique
in interface ShortBag
MutableList<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 ShortBag
MutableList<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 ShortBag
MutableShortBag select(ShortPredicate predicate)
ShortIterable
select
in interface MutableShortCollection
select
in interface ShortBag
select
in interface ShortIterable
MutableShortBag reject(ShortPredicate predicate)
ShortIterable
reject
in interface MutableShortCollection
reject
in interface ShortBag
reject
in interface ShortIterable
<V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
ShortIterable
collect
in interface MutableShortCollection
collect
in interface ShortBag
collect
in interface ShortIterable
MutableShortBag with(short element)
with
in interface MutableShortCollection
MutableShortBag without(short element)
without
in interface MutableShortCollection
MutableShortBag withAll(ShortIterable elements)
withAll
in interface MutableShortCollection
MutableShortBag withoutAll(ShortIterable elements)
withoutAll
in interface MutableShortCollection
MutableShortBag asUnmodifiable()
asUnmodifiable
in interface MutableShortCollection
MutableShortBag asSynchronized()
asSynchronized
in interface MutableShortCollection
ImmutableShortBag toImmutable()
toImmutable
in interface MutableShortCollection
toImmutable
in interface ShortBag
default MutableShortBag newEmpty()
newEmpty
in interface MutableShortCollection
Copyright © 2004–2019. All rights reserved.