@NotThreadSafe public final class UnmodifiableByteBag extends AbstractUnmodifiableByteCollection implements MutableByteBag
| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(byte item,
int occurrences) |
LazyByteIterable |
asLazy() |
MutableByteBag |
asSynchronized() |
MutableByteBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(ByteToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(ByteIntProcedure procedure)
For each distinct item, with the number of occurrences, execute the specified procedure.
|
int |
hashCode()
Follows the same general contract as
Bag.hashCode(). |
<T> T |
injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function) |
int |
occurrencesOf(byte item)
The occurrences of a distinct item in the bag.
|
MutableByteBag |
reject(BytePredicate predicate) |
boolean |
removeOccurrences(byte item,
int occurrences) |
MutableByteBag |
select(BytePredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableByteBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableByteBag |
with(byte element) |
UnmodifiableByteBag |
withAll(ByteIterable elements) |
UnmodifiableByteBag |
without(byte element) |
UnmodifiableByteBag |
withoutAll(ByteIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, byteIterator, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringadd, addAll, addAll, clear, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, byteIterator, contains, containsAll, containsAll, count, detectIfNone, forEach, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic UnmodifiableByteBag with(byte element)
with in interface MutableByteBagwith in interface MutableByteCollectionwith in class AbstractUnmodifiableByteCollectionpublic UnmodifiableByteBag without(byte element)
without in interface MutableByteBagwithout in interface MutableByteCollectionwithout in class AbstractUnmodifiableByteCollectionpublic UnmodifiableByteBag withAll(ByteIterable elements)
withAll in interface MutableByteBagwithAll in interface MutableByteCollectionwithAll in class AbstractUnmodifiableByteCollectionpublic UnmodifiableByteBag withoutAll(ByteIterable elements)
withoutAll in interface MutableByteBagwithoutAll in interface MutableByteCollectionwithoutAll in class AbstractUnmodifiableByteCollectionpublic void addOccurrences(byte item,
int occurrences)
addOccurrences in interface MutableByteBagpublic boolean removeOccurrences(byte item,
int occurrences)
removeOccurrences in interface MutableByteBagpublic int sizeDistinct()
ByteBagsizeDistinct in interface ByteBagpublic int occurrencesOf(byte item)
ByteBagoccurrencesOf in interface ByteBagpublic void forEachWithOccurrences(ByteIntProcedure procedure)
ByteBagforEachWithOccurrences in interface ByteBagpublic MutableByteBag select(BytePredicate predicate)
select in interface ByteBagselect in interface MutableByteBagselect in interface ByteIterableselect in interface MutableByteCollectionselect in class AbstractUnmodifiableByteCollectionpublic MutableByteBag reject(BytePredicate predicate)
reject in interface ByteBagreject in interface MutableByteBagreject in interface ByteIterablereject in interface MutableByteCollectionreject in class AbstractUnmodifiableByteCollectionpublic <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
collect in interface ByteBagcollect in interface MutableByteBagcollect in interface ByteIterablecollect in interface MutableByteCollectioncollect in class AbstractUnmodifiableByteCollectionpublic boolean equals(Object otherBag)
ByteBagBag.equals(Object).public int hashCode()
ByteBagBag.hashCode().public LazyByteIterable asLazy()
asLazy in interface ByteIterableasLazy in class AbstractUnmodifiableByteCollectionpublic MutableByteBag asUnmodifiable()
asUnmodifiable in interface MutableByteBagasUnmodifiable in interface MutableByteCollectionasUnmodifiable in class AbstractUnmodifiableByteCollectionpublic MutableByteBag asSynchronized()
asSynchronized in interface MutableByteBagasSynchronized in interface MutableByteCollectionasSynchronized in class AbstractUnmodifiableByteCollectionpublic ImmutableByteBag toImmutable()
MutableByteBagtoImmutable in interface ByteBagtoImmutable in interface MutableByteBagtoImmutable in interface MutableByteCollectiontoImmutable in class AbstractUnmodifiableByteCollectionpublic <T> T injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function)
injectInto in interface ByteIterableinjectInto in class AbstractUnmodifiableByteCollectionCopyright © 2004–2017. All rights reserved.