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 booleanallSatisfy(BytePredicate predicate)booleananySatisfy(BytePredicate predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyByteIterableasLazy()doubleaverage()ByteIteratorbyteIterator()Must be called in a synchronized block.RichIterable<ByteIterable>chunk(int size)<V> RichIterable<V>collect(ByteToObjectFunction<? extends V> function)booleancontains(byte value)booleancontainsAll(byte... source)booleancontainsAll(ByteIterable source)booleancontainsAny(byte... source)booleancontainsAny(ByteIterable source)booleancontainsNone(byte... source)booleancontainsNone(ByteIterable source)intcount(BytePredicate predicate)bytedetectIfNone(BytePredicate predicate, byte ifNone)voideach(ByteProcedure procedure)<T> TinjectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)booleanisEmpty()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)bytemax()bytemaxIfEmpty(byte defaultValue)doublemedian()bytemin()byteminIfEmpty(byte defaultValue)booleannoneSatisfy(BytePredicate predicate)booleannotEmpty()static SynchronizedByteIterableof(ByteIterable iterable)This method will take a ByteIterable and wrap it directly in a SynchronizedByteIterable.static SynchronizedByteIterableof(ByteIterable iterable, Object lock)This method will take a ByteIterable and wrap it directly in a SynchronizedByteIterable.longreduce(LongByteToLongFunction accumulator)longreduceIfEmpty(LongByteToLongFunction accumulator, long defaultValue)ByteIterablereject(BytePredicate predicate)ByteIterableselect(BytePredicate predicate)intsize()longsum()byte[]toArray()byte[]toArray(byte[] target)MutableByteBagtoBag()MutableByteListtoList()MutableByteSettoSet()byte[]toSortedArray()MutableByteListtoSortedList()StringtoString()-
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:
toArrayin interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target)
- Specified by:
toArrayin interfaceByteIterable
-
contains
public boolean contains(byte value)
- Specified by:
containsin interfaceByteIterable
-
containsAll
public boolean containsAll(byte... source)
- Specified by:
containsAllin interfaceByteIterable
-
containsAll
public boolean containsAll(ByteIterable source)
- Specified by:
containsAllin interfaceByteIterable
-
containsAny
public boolean containsAny(byte... source)
- Specified by:
containsAnyin interfaceByteIterable
-
containsAny
public boolean containsAny(ByteIterable source)
- Specified by:
containsAnyin interfaceByteIterable
-
containsNone
public boolean containsNone(byte... source)
- Specified by:
containsNonein interfaceByteIterable
-
containsNone
public boolean containsNone(ByteIterable source)
- Specified by:
containsNonein interfaceByteIterable
-
each
public void each(ByteProcedure procedure)
- Specified by:
eachin interfaceByteIterable- Since:
- 7.0.
-
select
public ByteIterable select(BytePredicate predicate)
- Specified by:
selectin interfaceByteIterable
-
reject
public ByteIterable reject(BytePredicate predicate)
- Specified by:
rejectin interfaceByteIterable
-
collect
public <V> RichIterable<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collectin interfaceByteIterable
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNonein interfaceByteIterable
-
count
public int count(BytePredicate predicate)
- Specified by:
countin interfaceByteIterable
-
anySatisfy
public boolean anySatisfy(BytePredicate predicate)
- Specified by:
anySatisfyin interfaceByteIterable
-
allSatisfy
public boolean allSatisfy(BytePredicate predicate)
- Specified by:
allSatisfyin interfaceByteIterable
-
noneSatisfy
public boolean noneSatisfy(BytePredicate predicate)
- Specified by:
noneSatisfyin interfaceByteIterable
-
toList
public MutableByteList toList()
- Specified by:
toListin interfaceByteIterable
-
toSet
public MutableByteSet toSet()
- Specified by:
toSetin interfaceByteIterable
-
toBag
public MutableByteBag toBag()
- Specified by:
toBagin interfaceByteIterable
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazyin interfaceByteIterable
-
sum
public long sum()
- Specified by:
sumin interfaceByteIterable
-
max
public byte max()
- Specified by:
maxin interfaceByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue)
- Specified by:
maxIfEmptyin interfaceByteIterable
-
min
public byte min()
- Specified by:
minin interfaceByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue)
- Specified by:
minIfEmptyin interfaceByteIterable
-
average
public double average()
- Specified by:
averagein interfaceByteIterable
-
median
public double median()
- Specified by:
medianin interfaceByteIterable
-
toSortedArray
public byte[] toSortedArray()
- Specified by:
toSortedArrayin interfaceByteIterable
-
toSortedList
public MutableByteList toSortedList()
- Specified by:
toSortedListin interfaceByteIterable
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfacePrimitiveIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceByteIterable
-
reduce
public long reduce(LongByteToLongFunction accumulator)
- Specified by:
reducein interfaceByteIterable
-
reduceIfEmpty
public long reduceIfEmpty(LongByteToLongFunction accumulator, long defaultValue)
- Specified by:
reduceIfEmptyin interfaceByteIterable
-
chunk
public RichIterable<ByteIterable> chunk(int size)
- Specified by:
chunkin interfaceByteIterable
-
toString
public String toString()
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
public String makeString()
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfacePrimitiveIterable
-
byteIterator
public ByteIterator byteIterator()
Must be called in a synchronized block.- Specified by:
byteIteratorin interfaceByteIterable
-
-