Class SynchronizedByteIterable
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.SynchronizedByteIterable
-
- All Implemented Interfaces:
Serializable
,ByteIterable
,PrimitiveIterable
public class SynchronizedByteIterable extends Object implements ByteIterable, Serializable
A synchronized view of a ByteIterable. This file was automatically generated from template file synchronizedPrimitiveIterable.stg.- Since:
- 5.0.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(BytePredicate predicate)
boolean
anySatisfy(BytePredicate predicate)
void
appendString(Appendable appendable)
void
appendString(Appendable appendable, String separator)
void
appendString(Appendable appendable, String start, String separator, String end)
LazyByteIterable
asLazy()
double
average()
ByteIterator
byteIterator()
Must be called in a synchronized block.RichIterable<ByteIterable>
chunk(int size)
<V> RichIterable<V>
collect(ByteToObjectFunction<? extends V> function)
boolean
contains(byte value)
boolean
containsAll(byte... source)
boolean
containsAll(ByteIterable source)
boolean
containsAny(byte... source)
boolean
containsAny(ByteIterable source)
boolean
containsNone(byte... source)
boolean
containsNone(ByteIterable source)
int
count(BytePredicate predicate)
byte
detectIfNone(BytePredicate predicate, byte ifNone)
void
each(ByteProcedure procedure)
<T> T
injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)
boolean
isEmpty()
String
makeString()
String
makeString(String separator)
String
makeString(String start, String separator, String end)
byte
max()
byte
maxIfEmpty(byte defaultValue)
double
median()
byte
min()
byte
minIfEmpty(byte defaultValue)
boolean
noneSatisfy(BytePredicate predicate)
boolean
notEmpty()
static SynchronizedByteIterable
of(ByteIterable iterable)
This method will take a ByteIterable and wrap it directly in a SynchronizedByteIterable.static SynchronizedByteIterable
of(ByteIterable iterable, Object lock)
This method will take a ByteIterable and wrap it directly in a SynchronizedByteIterable.long
reduce(LongByteToLongFunction accumulator)
long
reduceIfEmpty(LongByteToLongFunction accumulator, long defaultValue)
ByteIterable
reject(BytePredicate predicate)
ByteIterable
select(BytePredicate predicate)
int
size()
long
sum()
byte[]
toArray()
byte[]
toArray(byte[] target)
MutableByteBag
toBag()
MutableByteList
toList()
MutableByteSet
toSet()
byte[]
toSortedArray()
MutableByteList
toSortedList()
String
toString()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.ByteIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reject, select, summaryStatistics, tap, toSortedList, toSortedListBy, toSortedListBy
-
-
-
-
Method Detail
-
of
public static SynchronizedByteIterable of(ByteIterable iterable)
This method will take a ByteIterable and wrap it directly in a SynchronizedByteIterable.
-
of
public static SynchronizedByteIterable of(ByteIterable iterable, Object lock)
This method will take a ByteIterable and wrap it directly in a SynchronizedByteIterable. Additionally, a developer specifies which lock to use with the collection.
-
toArray
public byte[] toArray()
- Specified by:
toArray
in interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target)
- Specified by:
toArray
in interfaceByteIterable
-
contains
public boolean contains(byte value)
- Specified by:
contains
in interfaceByteIterable
-
containsAll
public boolean containsAll(byte... source)
- Specified by:
containsAll
in interfaceByteIterable
-
containsAll
public boolean containsAll(ByteIterable source)
- Specified by:
containsAll
in interfaceByteIterable
-
containsAny
public boolean containsAny(byte... source)
- Specified by:
containsAny
in interfaceByteIterable
-
containsAny
public boolean containsAny(ByteIterable source)
- Specified by:
containsAny
in interfaceByteIterable
-
containsNone
public boolean containsNone(byte... source)
- Specified by:
containsNone
in interfaceByteIterable
-
containsNone
public boolean containsNone(ByteIterable source)
- Specified by:
containsNone
in interfaceByteIterable
-
each
public void each(ByteProcedure procedure)
- Specified by:
each
in interfaceByteIterable
- Since:
- 7.0.
-
select
public ByteIterable select(BytePredicate predicate)
- Specified by:
select
in interfaceByteIterable
-
reject
public ByteIterable reject(BytePredicate predicate)
- Specified by:
reject
in interfaceByteIterable
-
collect
public <V> RichIterable<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceByteIterable
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNone
in interfaceByteIterable
-
count
public int count(BytePredicate predicate)
- Specified by:
count
in interfaceByteIterable
-
anySatisfy
public boolean anySatisfy(BytePredicate predicate)
- Specified by:
anySatisfy
in interfaceByteIterable
-
allSatisfy
public boolean allSatisfy(BytePredicate predicate)
- Specified by:
allSatisfy
in interfaceByteIterable
-
noneSatisfy
public boolean noneSatisfy(BytePredicate predicate)
- Specified by:
noneSatisfy
in interfaceByteIterable
-
toList
public MutableByteList toList()
- Specified by:
toList
in interfaceByteIterable
-
toSet
public MutableByteSet toSet()
- Specified by:
toSet
in interfaceByteIterable
-
toBag
public MutableByteBag toBag()
- Specified by:
toBag
in interfaceByteIterable
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazy
in interfaceByteIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceByteIterable
-
max
public byte max()
- Specified by:
max
in interfaceByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue)
- Specified by:
maxIfEmpty
in interfaceByteIterable
-
min
public byte min()
- Specified by:
min
in interfaceByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue)
- Specified by:
minIfEmpty
in interfaceByteIterable
-
average
public double average()
- Specified by:
average
in interfaceByteIterable
-
median
public double median()
- Specified by:
median
in interfaceByteIterable
-
toSortedArray
public byte[] toSortedArray()
- Specified by:
toSortedArray
in interfaceByteIterable
-
toSortedList
public MutableByteList toSortedList()
- Specified by:
toSortedList
in interfaceByteIterable
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceByteIterable
-
reduce
public long reduce(LongByteToLongFunction accumulator)
- Specified by:
reduce
in interfaceByteIterable
-
reduceIfEmpty
public long reduceIfEmpty(LongByteToLongFunction accumulator, long defaultValue)
- Specified by:
reduceIfEmpty
in interfaceByteIterable
-
chunk
public RichIterable<ByteIterable> chunk(int size)
- Specified by:
chunk
in interfaceByteIterable
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classObject
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
byteIterator
public ByteIterator byteIterator()
Must be called in a synchronized block.- Specified by:
byteIterator
in interfaceByteIterable
-
-