public interface MutableLongBag extends MutableLongCollection, LongBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(long item,
int occurrences) |
MutableLongBag |
asSynchronized() |
MutableLongBag |
asUnmodifiable() |
MutableList<LongIntPair> |
bottomOccurrences(int count)
Returns the
count least frequently occurring items. |
<V> MutableBag<V> |
collect(LongToObjectFunction<? extends V> function) |
MutableLongBag |
reject(LongPredicate predicate) |
boolean |
removeOccurrences(long item,
int occurrences) |
MutableLongBag |
select(LongPredicate predicate) |
MutableLongBag |
selectByOccurrences(IntPredicate predicate)
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
ImmutableLongBag |
toImmutable()
Returns an immutable copy of this bag.
|
MutableList<LongIntPair> |
topOccurrences(int count)
Returns the
count most frequently occurring items. |
MutableLongBag |
with(long element) |
MutableLongBag |
withAll(LongIterable elements) |
MutableLongBag |
without(long element) |
MutableLongBag |
withoutAll(LongIterable elements) |
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, retainAll, retainAll
equals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct
allSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
void addOccurrences(long item, int occurrences)
boolean removeOccurrences(long item, int occurrences)
MutableLongBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences
in interface LongBag
MutableList<LongIntPair> 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 LongBag
MutableList<LongIntPair> 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 LongBag
MutableLongBag select(LongPredicate predicate)
select
in interface LongBag
select
in interface LongIterable
select
in interface MutableLongCollection
MutableLongBag reject(LongPredicate predicate)
reject
in interface LongBag
reject
in interface LongIterable
reject
in interface MutableLongCollection
<V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
collect
in interface LongBag
collect
in interface LongIterable
collect
in interface MutableLongCollection
MutableLongBag with(long element)
with
in interface MutableLongCollection
MutableLongBag without(long element)
without
in interface MutableLongCollection
MutableLongBag withAll(LongIterable elements)
withAll
in interface MutableLongCollection
MutableLongBag withoutAll(LongIterable elements)
withoutAll
in interface MutableLongCollection
MutableLongBag asUnmodifiable()
asUnmodifiable
in interface MutableLongCollection
MutableLongBag asSynchronized()
asSynchronized
in interface MutableLongCollection
ImmutableLongBag toImmutable()
toImmutable
in interface LongBag
toImmutable
in interface MutableLongCollection
Copyright © 2004–2016. All rights reserved.