ByteBag
, ByteIterable
, MutableByteCollection
, PrimitiveIterable
ByteHashBag
, SynchronizedByteBag
, UnmodifiableByteBag
public interface MutableByteBag extends MutableByteCollection, ByteBag
Modifier and Type | Method | Description |
---|---|---|
void |
addOccurrences(byte item,
int occurrences) |
|
MutableByteBag |
asSynchronized() |
|
MutableByteBag |
asUnmodifiable() |
|
MutableList<ByteIntPair> |
bottomOccurrences(int count) |
Returns the
count least frequently occurring items. |
<V> MutableBag<V> |
collect(ByteToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
default MutableByteBag |
newEmpty() |
Creates a new empty mutable version of the same Bag type.
|
MutableByteBag |
reject(BytePredicate predicate) |
Returns a new ByteIterable with all of the elements in the ByteIterable that
return false for the specified predicate.
|
boolean |
removeOccurrences(byte item,
int occurrences) |
|
MutableByteBag |
select(BytePredicate predicate) |
Returns a new ByteIterable with all of the elements in the ByteIterable that
return true for the specified predicate.
|
MutableByteBag |
selectByOccurrences(IntPredicate predicate) |
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
default MutableByteBag |
selectDuplicates() |
Returns all elements of the bag that have more than one occurrence.
|
MutableByteSet |
selectUnique() |
Returns all elements of the bag that have exactly one occurrence.
|
default MutableByteBag |
tap(ByteProcedure procedure) |
|
ImmutableByteBag |
toImmutable() |
Returns an immutable copy of this bag.
|
MutableList<ByteIntPair> |
topOccurrences(int count) |
Returns the
count most frequently occurring items. |
MutableByteBag |
with(byte element) |
|
MutableByteBag |
withAll(ByteIterable elements) |
|
MutableByteBag |
without(byte element) |
|
MutableByteBag |
withoutAll(ByteIterable elements) |
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
add, addAll, addAll, byteIterator, clear, remove, removeAll, removeAll, removeIf, retainAll, retainAll
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
void addOccurrences(byte item, int occurrences)
boolean removeOccurrences(byte item, int occurrences)
default MutableByteBag tap(ByteProcedure procedure)
tap
in interface ByteBag
tap
in interface ByteIterable
tap
in interface MutableByteCollection
MutableByteBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences
in interface ByteBag
default MutableByteBag selectDuplicates()
selectDuplicates
in interface ByteBag
MutableByteSet selectUnique()
selectUnique
in interface ByteBag
MutableList<ByteIntPair> 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 ByteBag
MutableList<ByteIntPair> 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 ByteBag
MutableByteBag select(BytePredicate predicate)
ByteIterable
select
in interface ByteBag
select
in interface ByteIterable
select
in interface MutableByteCollection
MutableByteBag reject(BytePredicate predicate)
ByteIterable
reject
in interface ByteBag
reject
in interface ByteIterable
reject
in interface MutableByteCollection
<V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
ByteIterable
collect
in interface ByteBag
collect
in interface ByteIterable
collect
in interface MutableByteCollection
MutableByteBag with(byte element)
with
in interface MutableByteCollection
MutableByteBag without(byte element)
without
in interface MutableByteCollection
MutableByteBag withAll(ByteIterable elements)
withAll
in interface MutableByteCollection
MutableByteBag withoutAll(ByteIterable elements)
withoutAll
in interface MutableByteCollection
MutableByteBag asUnmodifiable()
asUnmodifiable
in interface MutableByteCollection
MutableByteBag asSynchronized()
asSynchronized
in interface MutableByteCollection
ImmutableByteBag toImmutable()
toImmutable
in interface ByteBag
toImmutable
in interface MutableByteCollection
default MutableByteBag newEmpty()
newEmpty
in interface MutableByteCollection
Copyright © 2004–2019. All rights reserved.