@ThreadSafe public final class SynchronizedByteBag extends AbstractSynchronizedByteCollection implements MutableByteBag
MutableByteBag. It is imperative that the user manually synchronize on the collection when iterating over it using the
ByteIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveBag.stg.
MutableByteBag.asSynchronized(),
MutableBag.asSynchronized(),
Serialized Form| 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(). |
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.
|
SynchronizedByteBag |
with(byte element) |
SynchronizedByteBag |
withAll(ByteIterable elements) |
SynchronizedByteBag |
without(byte element) |
SynchronizedByteBag |
withoutAll(ByteIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, byteIterator, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, 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, byteIterator, clear, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic SynchronizedByteBag with(byte element)
with in interface MutableByteBagwith in interface MutableByteCollectionwith in class AbstractSynchronizedByteCollectionpublic SynchronizedByteBag without(byte element)
without in interface MutableByteBagwithout in interface MutableByteCollectionwithout in class AbstractSynchronizedByteCollectionpublic SynchronizedByteBag withAll(ByteIterable elements)
withAll in interface MutableByteBagwithAll in interface MutableByteCollectionwithAll in class AbstractSynchronizedByteCollectionpublic SynchronizedByteBag withoutAll(ByteIterable elements)
withoutAll in interface MutableByteBagwithoutAll in interface MutableByteCollectionwithoutAll in class AbstractSynchronizedByteCollectionpublic 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 AbstractSynchronizedByteCollectionpublic MutableByteBag reject(BytePredicate predicate)
reject in interface ByteBagreject in interface MutableByteBagreject in interface ByteIterablereject in interface MutableByteCollectionreject in class AbstractSynchronizedByteCollectionpublic <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
collect in interface ByteBagcollect in interface MutableByteBagcollect in interface ByteIterablecollect in interface MutableByteCollectioncollect in class AbstractSynchronizedByteCollectionpublic boolean equals(Object otherBag)
ByteBagBag.equals(Object).public int hashCode()
ByteBagBag.hashCode().public LazyByteIterable asLazy()
asLazy in interface ByteIterableasLazy in class AbstractSynchronizedByteCollectionpublic MutableByteBag asUnmodifiable()
asUnmodifiable in interface MutableByteBagasUnmodifiable in interface MutableByteCollectionasUnmodifiable in class AbstractSynchronizedByteCollectionpublic MutableByteBag asSynchronized()
asSynchronized in interface MutableByteBagasSynchronized in interface MutableByteCollectionasSynchronized in class AbstractSynchronizedByteCollectionpublic ImmutableByteBag toImmutable()
MutableByteBagtoImmutable in interface ByteBagtoImmutable in interface MutableByteBagtoImmutable in interface MutableByteCollectiontoImmutable in class AbstractSynchronizedByteCollectionCopyright © 2004–2016. All rights reserved.