@ThreadSafe public final class SynchronizedByteBag extends AbstractSynchronizedByteCollection implements com.gs.collections.api.bag.primitive.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) |
com.gs.collections.api.LazyByteIterable |
asLazy() |
com.gs.collections.api.bag.primitive.MutableByteBag |
asSynchronized() |
com.gs.collections.api.bag.primitive.MutableByteBag |
asUnmodifiable() |
<V> com.gs.collections.api.bag.MutableBag<V> |
collect(com.gs.collections.api.block.function.primitive.ByteToObjectFunction<? extends V> function) |
boolean |
equals(java.lang.Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.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.
|
com.gs.collections.api.bag.primitive.MutableByteBag |
reject(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
boolean |
removeOccurrences(byte item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableByteBag |
select(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
com.gs.collections.api.bag.primitive.ImmutableByteBag |
toImmutable()
Returns an immutable copy of this bag.
|
SynchronizedByteBag |
with(byte element) |
SynchronizedByteBag |
withAll(com.gs.collections.api.ByteIterable elements) |
SynchronizedByteBag |
without(byte element) |
SynchronizedByteBag |
withoutAll(com.gs.collections.api.ByteIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, byteIterator, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, getByteCollection, getLock, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, 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, toSortedListpublic SynchronizedByteBag with(byte element)
with in interface com.gs.collections.api.bag.primitive.MutableByteBagwith in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwith in class AbstractSynchronizedByteCollectionpublic SynchronizedByteBag without(byte element)
without in interface com.gs.collections.api.bag.primitive.MutableByteBagwithout in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwithout in class AbstractSynchronizedByteCollectionpublic SynchronizedByteBag withAll(com.gs.collections.api.ByteIterable elements)
withAll in interface com.gs.collections.api.bag.primitive.MutableByteBagwithAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwithAll in class AbstractSynchronizedByteCollectionpublic SynchronizedByteBag withoutAll(com.gs.collections.api.ByteIterable elements)
withoutAll in interface com.gs.collections.api.bag.primitive.MutableByteBagwithoutAll in interface com.gs.collections.api.collection.primitive.MutableByteCollectionwithoutAll in class AbstractSynchronizedByteCollectionpublic void addOccurrences(byte item,
int occurrences)
addOccurrences in interface com.gs.collections.api.bag.primitive.MutableByteBagpublic boolean removeOccurrences(byte item,
int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.primitive.MutableByteBagpublic int sizeDistinct()
com.gs.collections.api.bag.primitive.ByteBagsizeDistinct in interface com.gs.collections.api.bag.primitive.ByteBagpublic int occurrencesOf(byte item)
com.gs.collections.api.bag.primitive.ByteBagoccurrencesOf in interface com.gs.collections.api.bag.primitive.ByteBagpublic void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.ByteIntProcedure procedure)
com.gs.collections.api.bag.primitive.ByteBagforEachWithOccurrences in interface com.gs.collections.api.bag.primitive.ByteBagpublic com.gs.collections.api.bag.primitive.MutableByteBag select(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
select in interface com.gs.collections.api.bag.primitive.ByteBagselect in interface com.gs.collections.api.bag.primitive.MutableByteBagselect in interface com.gs.collections.api.ByteIterableselect in interface com.gs.collections.api.collection.primitive.MutableByteCollectionselect in class AbstractSynchronizedByteCollectionpublic com.gs.collections.api.bag.primitive.MutableByteBag reject(com.gs.collections.api.block.predicate.primitive.BytePredicate predicate)
reject in interface com.gs.collections.api.bag.primitive.ByteBagreject in interface com.gs.collections.api.bag.primitive.MutableByteBagreject in interface com.gs.collections.api.ByteIterablereject in interface com.gs.collections.api.collection.primitive.MutableByteCollectionreject in class AbstractSynchronizedByteCollectionpublic <V> com.gs.collections.api.bag.MutableBag<V> collect(com.gs.collections.api.block.function.primitive.ByteToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.bag.primitive.ByteBagcollect in interface com.gs.collections.api.bag.primitive.MutableByteBagcollect in interface com.gs.collections.api.ByteIterablecollect in interface com.gs.collections.api.collection.primitive.MutableByteCollectioncollect in class AbstractSynchronizedByteCollectionpublic boolean equals(java.lang.Object otherBag)
com.gs.collections.api.bag.primitive.ByteBagBag.equals(Object).equals in interface com.gs.collections.api.bag.primitive.ByteBagequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.bag.primitive.ByteBagBag.hashCode().hashCode in interface com.gs.collections.api.bag.primitive.ByteBaghashCode in class java.lang.Objectpublic com.gs.collections.api.LazyByteIterable asLazy()
asLazy in interface com.gs.collections.api.ByteIterableasLazy in class AbstractSynchronizedByteCollectionpublic com.gs.collections.api.bag.primitive.MutableByteBag asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.bag.primitive.MutableByteBagasUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableByteCollectionasUnmodifiable in class AbstractSynchronizedByteCollectionpublic com.gs.collections.api.bag.primitive.MutableByteBag asSynchronized()
asSynchronized in interface com.gs.collections.api.bag.primitive.MutableByteBagasSynchronized in interface com.gs.collections.api.collection.primitive.MutableByteCollectionasSynchronized in class AbstractSynchronizedByteCollectionpublic com.gs.collections.api.bag.primitive.ImmutableByteBag toImmutable()
com.gs.collections.api.bag.primitive.MutableByteBagtoImmutable in interface com.gs.collections.api.bag.primitive.ByteBagtoImmutable in interface com.gs.collections.api.bag.primitive.MutableByteBagtoImmutable in interface com.gs.collections.api.collection.primitive.MutableByteCollectiontoImmutable in class AbstractSynchronizedByteCollection