Class UnmodifiableByteStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.mutable.primitive.UnmodifiableByteStack
-
- All Implemented Interfaces:
Serializable
,ByteIterable
,OrderedByteIterable
,PrimitiveIterable
,ByteStack
,MutableByteStack
public class UnmodifiableByteStack extends Object implements MutableByteStack, Serializable
This file was automatically generated from template file unmodifiablePrimitiveStack.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableByteStack(MutableByteStack stack)
-
Method Summary
All 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()
MutableByteStack
asSynchronized()
MutableByteStack
asUnmodifiable()
double
average()
ByteIterator
byteIterator()
RichIterable<ByteIterable>
chunk(int size)
void
clear()
<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.boolean
contains(byte value)
boolean
containsAll(byte... source)
boolean
containsAll(ByteIterable source)
int
count(BytePredicate predicate)
byte
detectIfNone(BytePredicate predicate, byte ifNone)
void
each(ByteProcedure procedure)
boolean
equals(Object otherStack)
void
forEachWithIndex(ByteIntProcedure procedure)
byte
getFirst()
int
hashCode()
int
indexOf(byte value)
<T> T
injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)
<T> T
injectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? 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)
MutableByteStack
newEmpty()
boolean
noneSatisfy(BytePredicate predicate)
boolean
notEmpty()
byte
peek()
ByteList
peek(int count)
byte
peekAt(int index)
byte
pop()
ByteList
pop(int count)
void
push(byte item)
MutableByteStack
reject(BytePredicate predicate)
MutableByteStack
select(BytePredicate predicate)
int
size()
long
sum()
byte[]
toArray()
byte[]
toArray(byte[] target)
MutableByteBag
toBag()
ImmutableByteStack
toImmutable()
MutableByteList
toList()
MutableByteSet
toSet()
byte[]
toSortedArray()
MutableByteList
toSortedList()
String
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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableByteStack
rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedByteIterable
rejectWithIndex, selectWithIndex
-
-
-
-
Constructor Detail
-
UnmodifiableByteStack
public UnmodifiableByteStack(MutableByteStack stack)
-
-
Method Detail
-
push
public void push(byte item)
- Specified by:
push
in interfaceMutableByteStack
-
pop
public byte pop()
- Specified by:
pop
in interfaceMutableByteStack
-
pop
public ByteList pop(int count)
- Specified by:
pop
in interfaceMutableByteStack
-
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
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableByteStack
-
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
-
byteIterator
public ByteIterator byteIterator()
- Specified by:
byteIterator
in interfaceByteIterable
-
each
public void each(ByteProcedure procedure)
- Specified by:
each
in interfaceByteIterable
- Since:
- 7.0.
-
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
-
detectIfNone
public byte detectIfNone(BytePredicate predicate, byte ifNone)
- Specified by:
detectIfNone
in interfaceByteIterable
-
select
public MutableByteStack select(BytePredicate predicate)
- Specified by:
select
in interfaceByteIterable
- Specified by:
select
in interfaceByteStack
- Specified by:
select
in interfaceMutableByteStack
- Specified by:
select
in interfaceOrderedByteIterable
-
reject
public MutableByteStack reject(BytePredicate predicate)
- Specified by:
reject
in interfaceByteIterable
- Specified by:
reject
in interfaceByteStack
- Specified by:
reject
in interfaceMutableByteStack
- Specified by:
reject
in interfaceOrderedByteIterable
-
collect
public <V> MutableStack<V> collect(ByteToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceByteIterable
- Specified by:
collect
in interfaceByteStack
- Specified by:
collect
in interfaceMutableByteStack
- Specified by:
collect
in interfaceOrderedByteIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceByteIterable
-
max
public byte max()
- Specified by:
max
in interfaceByteIterable
-
min
public byte min()
- Specified by:
min
in interfaceByteIterable
-
minIfEmpty
public byte minIfEmpty(byte defaultValue)
- Specified by:
minIfEmpty
in interfaceByteIterable
-
maxIfEmpty
public byte maxIfEmpty(byte defaultValue)
- Specified by:
maxIfEmpty
in interfaceByteIterable
-
average
public double average()
- Specified by:
average
in interfaceByteIterable
-
median
public double median()
- Specified by:
median
in interfaceByteIterable
-
toSortedList
public MutableByteList toSortedList()
- Specified by:
toSortedList
in interfaceByteIterable
-
toSortedArray
public byte[] toSortedArray()
- Specified by:
toSortedArray
in interfaceByteIterable
-
toArray
public byte[] toArray()
- Specified by:
toArray
in interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target)
- Specified by:
toArray
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
-
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
-
equals
public boolean equals(Object otherStack)
-
hashCode
public int hashCode()
-
asLazy
public LazyByteIterable asLazy()
- Specified by:
asLazy
in interfaceByteIterable
-
asUnmodifiable
public MutableByteStack asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableByteStack
-
asSynchronized
public MutableByteStack asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableByteStack
-
toImmutable
public ImmutableByteStack toImmutable()
- Specified by:
toImmutable
in interfaceByteStack
-
newEmpty
public MutableByteStack newEmpty()
- Specified by:
newEmpty
in interfaceMutableByteStack
- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceByteIterable
-
chunk
public RichIterable<ByteIterable> chunk(int size)
- Specified by:
chunk
in interfaceByteIterable
-
getFirst
public byte getFirst()
- Specified by:
getFirst
in interfaceOrderedByteIterable
-
indexOf
public int indexOf(byte value)
- Specified by:
indexOf
in interfaceOrderedByteIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectByteIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedByteIterable
-
forEachWithIndex
public void forEachWithIndex(ByteIntProcedure procedure)
- Specified by:
forEachWithIndex
in interfaceOrderedByteIterable
-
collectWithIndex
public <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.- Specified by:
collectWithIndex
in interfaceByteStack
- Specified by:
collectWithIndex
in interfaceMutableByteStack
- Specified by:
collectWithIndex
in 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:
collectWithIndex
in interfaceOrderedByteIterable
- Since:
- 9.1.
-
-