public interface MutableIntBag extends MutableIntCollection, IntBag
| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(int item,
int occurrences) |
MutableIntBag |
asSynchronized() |
MutableIntBag |
asUnmodifiable() |
MutableList<IntIntPair> |
bottomOccurrences(int count)
Returns the
count least frequently occurring items. |
<V> MutableBag<V> |
collect(IntToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
default MutableIntBag |
newEmpty()
Creates a new empty mutable version of the same Bag type.
|
MutableIntBag |
reject(IntPredicate predicate)
Returns a new IntIterable with all of the elements in the IntIterable that
return false for the specified predicate.
|
boolean |
removeOccurrences(int item,
int occurrences) |
MutableIntBag |
select(IntPredicate predicate)
Returns a new IntIterable with all of the elements in the IntIterable that
return true for the specified predicate.
|
MutableIntBag |
selectByOccurrences(IntPredicate predicate)
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
default MutableIntBag |
selectDuplicates()
Returns all elements of the bag that have more than one occurrence.
|
MutableIntSet |
selectUnique()
Returns all elements of the bag that have exactly one occurrence.
|
default MutableIntBag |
tap(IntProcedure procedure) |
ImmutableIntBag |
toImmutable()
Returns an immutable copy of this bag.
|
MutableList<IntIntPair> |
topOccurrences(int count)
Returns the
count most frequently occurring items. |
MutableIntBag |
with(int element) |
MutableIntBag |
withAll(IntIterable elements) |
MutableIntBag |
without(int element) |
MutableIntBag |
withoutAll(IntIterable elements) |
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAllequals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct, toStringOfItemToCountallSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringvoid addOccurrences(int item,
int occurrences)
boolean removeOccurrences(int item,
int occurrences)
default MutableIntBag tap(IntProcedure procedure)
tap in interface IntBagtap in interface IntIterabletap in interface MutableIntCollectionMutableIntBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface IntBagdefault MutableIntBag selectDuplicates()
selectDuplicates in interface IntBagMutableIntSet selectUnique()
selectUnique in interface IntBagMutableList<IntIntPair> 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 IntBagMutableList<IntIntPair> 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 IntBagMutableIntBag select(IntPredicate predicate)
IntIterableselect in interface IntBagselect in interface IntIterableselect in interface MutableIntCollectionMutableIntBag reject(IntPredicate predicate)
IntIterablereject in interface IntBagreject in interface IntIterablereject in interface MutableIntCollection<V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
IntIterablecollect in interface IntBagcollect in interface IntIterablecollect in interface MutableIntCollectionMutableIntBag with(int element)
with in interface MutableIntCollectionMutableIntBag without(int element)
without in interface MutableIntCollectionMutableIntBag withAll(IntIterable elements)
withAll in interface MutableIntCollectionMutableIntBag withoutAll(IntIterable elements)
withoutAll in interface MutableIntCollectionMutableIntBag asUnmodifiable()
asUnmodifiable in interface MutableIntCollectionMutableIntBag asSynchronized()
asSynchronized in interface MutableIntCollectionImmutableIntBag toImmutable()
toImmutable in interface IntBagtoImmutable in interface MutableIntCollectiondefault MutableIntBag newEmpty()
newEmpty in interface MutableIntCollectionCopyright © 2004–2021. All rights reserved.