Class SynchronizedByteStack
java.lang.Object
org.eclipse.collections.impl.stack.mutable.primitive.SynchronizedByteStack
- All Implemented Interfaces:
Serializable,ByteIterable,OrderedByteIterable,PrimitiveIterable,ByteStack,MutableByteStack
A synchronized view of a
MutableByteStack. 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 synchronizedPrimitiveStack.stg.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(BytePredicate predicate) booleananySatisfy(BytePredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()doubleaverage()Must be called in a synchronized block.chunk(int size) voidclear()<V> MutableStack<V>collect(ByteToObjectFunction<? extends V> function) <V> MutableStack<V>collectWithIndex(ByteIntToObjectFunction<? extends V> function) Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.<V,R extends Collection<V>>
RcollectWithIndex(ByteIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.booleancontains(byte value) booleancontainsAll(byte... source) booleancontainsAll(ByteIterable source) intcount(BytePredicate predicate) bytedetectIfNone(BytePredicate predicate, byte ifNone) voideach(ByteProcedure procedure) booleanvoidforEachWithIndex(ByteIntProcedure procedure) bytegetFirst()inthashCode()intindexOf(byte value) <T> TinjectInto(T injectedValue, ObjectByteToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T, ? extends T> function) booleanisEmpty()makeString(String separator) makeString(String start, String separator, String end) bytemax()bytemaxIfEmpty(byte defaultValue) doublemedian()bytemin()byteminIfEmpty(byte defaultValue) newEmpty()booleannoneSatisfy(BytePredicate predicate) booleannotEmpty()bytepeek()peek(int count) bytepeekAt(int index) bytepop()pop(int count) voidpush(byte item) reject(BytePredicate predicate) rejectWithIndex(ByteIntPredicate predicate) Returns a new MutableByteStack excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableByteCollection>
RrejectWithIndex(ByteIntPredicate predicate, R target) Returns a new MutableByteCollection excluding all elements with corresponding indexes matching the specified predicate.select(BytePredicate predicate) selectWithIndex(ByteIntPredicate predicate) Returns a new MutableByteStack including all elements with corresponding indexes matching the specified predicate.<R extends MutableByteCollection>
RselectWithIndex(ByteIntPredicate predicate, R target) Returns a new MutableByteCollection including all elements with corresponding indexes matching the specified predicate.intsize()longsum()byte[]toArray()byte[]toArray(byte[] target) toBag()toList()toSet()byte[]toStack()toString()Methods inherited from interface org.eclipse.collections.api.ByteIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.stack.primitive.MutableByteStack
tap
-
Constructor Details
-
SynchronizedByteStack
-
SynchronizedByteStack
-
-
Method Details
-
push
public void push(byte item) - Specified by:
pushin interfaceMutableByteStack
-
pop
public byte pop()- Specified by:
popin interfaceMutableByteStack
-
pop
- Specified by:
popin interfaceMutableByteStack
-
peek
public byte peek() -
peek
-
peekAt
public byte peekAt(int index) -
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableByteStack
-
contains
public boolean contains(byte value) - Specified by:
containsin interfaceByteIterable
-
containsAll
public boolean containsAll(byte... source) - Specified by:
containsAllin interfaceByteIterable
-
containsAll
- Specified by:
containsAllin interfaceByteIterable
-
byteIterator
Must be called in a synchronized block.- Specified by:
byteIteratorin interfaceByteIterable
-
each
- Specified by:
eachin interfaceByteIterable- Since:
- 7.0.
-
count
- Specified by:
countin interfaceByteIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceByteIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceByteIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceByteIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceByteIterable
-
select
- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceByteStack- Specified by:
selectin interfaceMutableByteStack- Specified by:
selectin interfaceOrderedByteIterable
-
reject
- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceByteStack- Specified by:
rejectin interfaceMutableByteStack- Specified by:
rejectin interfaceOrderedByteIterable
-
collect
- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceByteStack- Specified by:
collectin interfaceMutableByteStack- Specified by:
collectin interfaceOrderedByteIterable
-
sum
public long sum()- Specified by:
sumin interfaceByteIterable
-
max
public byte max()- Specified by:
maxin interfaceByteIterable
-
min
public byte min()- Specified by:
minin interfaceByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue) - Specified by:
minIfEmptyin interfaceByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue) - Specified by:
maxIfEmptyin interfaceByteIterable
-
average
public double average()- Specified by:
averagein interfaceByteIterable
-
median
public double median()- Specified by:
medianin interfaceByteIterable
-
toSortedList
- Specified by:
toSortedListin interfaceByteIterable
-
toSortedArray
public byte[] toSortedArray()- Specified by:
toSortedArrayin interfaceByteIterable
-
toArray
public byte[] toArray()- Specified by:
toArrayin interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target) - Specified by:
toArrayin interfaceByteIterable
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
- Specified by:
toListin interfaceByteIterable
-
toSet
- Specified by:
toSetin interfaceByteIterable
-
toBag
- Specified by:
toBagin interfaceByteIterable
-
equals
-
hashCode
public int hashCode() -
asLazy
- Specified by:
asLazyin interfaceByteIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableByteStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableByteStack
-
toImmutable
- Specified by:
toImmutablein interfaceByteStack
-
newEmpty
- Specified by:
newEmptyin interfaceMutableByteStack- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceByteIterable
-
chunk
- Specified by:
chunkin interfaceByteIterable
-
getFirst
public byte getFirst()- Specified by:
getFirstin interfaceOrderedByteIterable
-
indexOf
public int indexOf(byte value) - Specified by:
indexOfin interfaceOrderedByteIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedByteIterable
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedByteIterable
-
selectWithIndex
Returns a new MutableByteStack including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceByteStack- Specified by:
selectWithIndexin interfaceMutableByteStack- Specified by:
selectWithIndexin interfaceOrderedByteIterable- Since:
- 11.1.
-
selectWithIndex
Returns a new MutableByteCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedByteIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableByteStack excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceByteStack- Specified by:
rejectWithIndexin interfaceMutableByteStack- Specified by:
rejectWithIndexin interfaceOrderedByteIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableByteCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedByteIterable- Since:
- 11.1.
-
collectWithIndex
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceByteStack- Specified by:
collectWithIndexin interfaceMutableByteStack- Specified by:
collectWithIndexin interfaceOrderedByteIterable- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(ByteIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedByteIterable- Since:
- 9.1.
-
toStack
- Specified by:
toStackin interfaceOrderedByteIterable
-