LongBag
, LongIterable
, MutableLongCollection
, PrimitiveIterable
LongHashBag
, SynchronizedLongBag
, UnmodifiableLongBag
public interface MutableLongBag extends MutableLongCollection, LongBag
Modifier and Type | Method | 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) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
MutableLongBag |
reject(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return false for the specified predicate.
|
boolean |
removeOccurrences(long item,
int occurrences) |
|
MutableLongBag |
select(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return true for the specified predicate.
|
MutableLongBag |
selectByOccurrences(IntPredicate predicate) |
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
default MutableLongBag |
tap(LongProcedure procedure) |
|
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) |
equals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct
allSatisfy, 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, toSortedList
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, retainAll, retainAll
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
void addOccurrences(long item, int occurrences)
boolean removeOccurrences(long item, int occurrences)
default MutableLongBag tap(LongProcedure procedure)
tap
in interface LongBag
tap
in interface LongIterable
tap
in interface MutableLongCollection
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)
LongIterable
select
in interface LongBag
select
in interface LongIterable
select
in interface MutableLongCollection
MutableLongBag reject(LongPredicate predicate)
LongIterable
reject
in interface LongBag
reject
in interface LongIterable
reject
in interface MutableLongCollection
<V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
LongIterable
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–2017. All rights reserved.