IntBag
, IntIterable
, MutableIntCollection
, PrimitiveIterable
IntHashBag
, SynchronizedIntBag
, UnmodifiableIntBag
public interface MutableIntBag extends MutableIntCollection, IntBag
Modifier and Type | Method | 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.
|
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.
|
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) |
equals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct
allSatisfy, anySatisfy, asLazy, average, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
add, addAll, addAll, clear, intIterator, remove, removeAll, removeAll, retainAll, retainAll
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
void addOccurrences(int item, int occurrences)
boolean removeOccurrences(int item, int occurrences)
MutableIntBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences
in interface IntBag
MutableList<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 IntBag
MutableList<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 IntBag
MutableIntBag select(IntPredicate predicate)
IntIterable
select
in interface IntBag
select
in interface IntIterable
select
in interface MutableIntCollection
MutableIntBag reject(IntPredicate predicate)
IntIterable
reject
in interface IntBag
reject
in interface IntIterable
reject
in interface MutableIntCollection
<V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
IntIterable
collect
in interface IntBag
collect
in interface IntIterable
collect
in interface MutableIntCollection
MutableIntBag with(int element)
with
in interface MutableIntCollection
MutableIntBag without(int element)
without
in interface MutableIntCollection
MutableIntBag withAll(IntIterable elements)
withAll
in interface MutableIntCollection
MutableIntBag withoutAll(IntIterable elements)
withoutAll
in interface MutableIntCollection
MutableIntBag asUnmodifiable()
asUnmodifiable
in interface MutableIntCollection
MutableIntBag asSynchronized()
asSynchronized
in interface MutableIntCollection
ImmutableIntBag toImmutable()
toImmutable
in interface IntBag
toImmutable
in interface MutableIntCollection
Copyright © 2004–2017. All rights reserved.