@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 FormModifier 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, toString
add, addAll, addAll, byteIterator, clear, remove, removeAll, removeAll, retainAll, retainAll
allSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public SynchronizedByteBag with(byte element)
with
in interface MutableByteBag
with
in interface MutableByteCollection
with
in class AbstractSynchronizedByteCollection
public SynchronizedByteBag without(byte element)
without
in interface MutableByteBag
without
in interface MutableByteCollection
without
in class AbstractSynchronizedByteCollection
public SynchronizedByteBag withAll(ByteIterable elements)
withAll
in interface MutableByteBag
withAll
in interface MutableByteCollection
withAll
in class AbstractSynchronizedByteCollection
public SynchronizedByteBag withoutAll(ByteIterable elements)
withoutAll
in interface MutableByteBag
withoutAll
in interface MutableByteCollection
withoutAll
in class AbstractSynchronizedByteCollection
public void addOccurrences(byte item, int occurrences)
addOccurrences
in interface MutableByteBag
public boolean removeOccurrences(byte item, int occurrences)
removeOccurrences
in interface MutableByteBag
public int sizeDistinct()
ByteBag
sizeDistinct
in interface ByteBag
public int occurrencesOf(byte item)
ByteBag
occurrencesOf
in interface ByteBag
public void forEachWithOccurrences(ByteIntProcedure procedure)
ByteBag
forEachWithOccurrences
in interface ByteBag
public MutableByteBag select(BytePredicate predicate)
select
in interface ByteBag
select
in interface MutableByteBag
select
in interface ByteIterable
select
in interface MutableByteCollection
select
in class AbstractSynchronizedByteCollection
public MutableByteBag reject(BytePredicate predicate)
reject
in interface ByteBag
reject
in interface MutableByteBag
reject
in interface ByteIterable
reject
in interface MutableByteCollection
reject
in class AbstractSynchronizedByteCollection
public <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
collect
in interface ByteBag
collect
in interface MutableByteBag
collect
in interface ByteIterable
collect
in interface MutableByteCollection
collect
in class AbstractSynchronizedByteCollection
public boolean equals(Object otherBag)
ByteBag
Bag.equals(Object)
.public int hashCode()
ByteBag
Bag.hashCode()
.public LazyByteIterable asLazy()
asLazy
in interface ByteIterable
asLazy
in class AbstractSynchronizedByteCollection
public MutableByteBag asUnmodifiable()
asUnmodifiable
in interface MutableByteBag
asUnmodifiable
in interface MutableByteCollection
asUnmodifiable
in class AbstractSynchronizedByteCollection
public MutableByteBag asSynchronized()
asSynchronized
in interface MutableByteBag
asSynchronized
in interface MutableByteCollection
asSynchronized
in class AbstractSynchronizedByteCollection
public ImmutableByteBag toImmutable()
MutableByteBag
toImmutable
in interface ByteBag
toImmutable
in interface MutableByteBag
toImmutable
in interface MutableByteCollection
toImmutable
in class AbstractSynchronizedByteCollection
Copyright © 2004–2016. All rights reserved.