java.io.Externalizable
, java.io.Serializable
, ByteIterable
, OrderedByteIterable
, PrimitiveIterable
, ByteStack
, MutableByteStack
public final class ByteArrayStack extends AbstractByteStack implements MutableByteStack, java.io.Externalizable
ArrayStack
, and is memory-optimized for byte primitives.
This file was automatically generated from template file primitiveArrayStack.stg.Constructor | Description |
---|---|
ByteArrayStack() |
Modifier and Type | Method | Description |
---|---|---|
MutableByteStack |
asSynchronized() |
|
MutableByteStack |
asUnmodifiable() |
|
void |
clear() |
Clears the Stack
|
<V> MutableStack<V> |
collect(ByteToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
static ByteArrayStack |
newStack(ByteIterable items) |
|
static ByteArrayStack |
newStackFromTopToBottom(byte... items) |
|
static ByteArrayStack |
newStackFromTopToBottom(ByteIterable items) |
|
static ByteArrayStack |
newStackWith(byte... items) |
|
byte |
pop() |
Removes and returns the top element of the stack.
|
ByteList |
pop(int count) |
Removes and returns a ByteList of the number of elements specified by the count, beginning with the top of the stack.
|
void |
push(byte item) |
Adds an item to the top of the stack.
|
void |
readExternal(java.io.ObjectInput in) |
|
MutableByteStack |
reject(BytePredicate predicate) |
Returns a new ByteIterable with all of the elements in the ByteIterable that
return false for the specified predicate.
|
MutableByteStack |
select(BytePredicate predicate) |
Returns a new ByteIterable with all of the elements in the ByteIterable that
return true for the specified predicate.
|
ImmutableByteStack |
toImmutable() |
|
MutableByteList |
toSortedList() |
|
void |
writeExternal(java.io.ObjectOutput out) |
allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, byteIterator, contains, containsAll, containsAll, count, detectIfNone, each, equals, forEach, forEachWithIndex, getFirst, hashCode, indexOf, injectInto, injectIntoWithIndex, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, peek, peek, peekAt, size, sum, toArray, toBag, toList, toSet, toSortedArray, toString
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, byteIterator, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray
equals, hashCode, peek, peek, peekAt
tap
forEachWithIndex, getFirst, indexOf, injectIntoWithIndex
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public static ByteArrayStack newStackFromTopToBottom(byte... items)
public static ByteArrayStack newStackWith(byte... items)
public static ByteArrayStack newStack(ByteIterable items)
public static ByteArrayStack newStackFromTopToBottom(ByteIterable items)
public void push(byte item)
MutableByteStack
push
in interface MutableByteStack
public byte pop()
MutableByteStack
pop
in interface MutableByteStack
public ByteList pop(int count)
MutableByteStack
pop
in interface MutableByteStack
public MutableByteStack select(BytePredicate predicate)
ByteIterable
select
in interface ByteIterable
select
in interface ByteStack
select
in interface MutableByteStack
select
in interface OrderedByteIterable
public MutableByteStack reject(BytePredicate predicate)
ByteIterable
reject
in interface ByteIterable
reject
in interface ByteStack
reject
in interface MutableByteStack
reject
in interface OrderedByteIterable
public <V> MutableStack<V> collect(ByteToObjectFunction<? extends V> function)
ByteIterable
collect
in interface ByteIterable
collect
in interface ByteStack
collect
in interface MutableByteStack
collect
in interface OrderedByteIterable
public void clear()
MutableByteStack
clear
in interface MutableByteStack
public MutableByteList toSortedList()
toSortedList
in interface ByteIterable
public MutableByteStack asUnmodifiable()
asUnmodifiable
in interface MutableByteStack
public MutableByteStack asSynchronized()
asSynchronized
in interface MutableByteStack
public ImmutableByteStack toImmutable()
toImmutable
in interface ByteStack
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
java.io.IOException
Copyright © 2004–2017. All rights reserved.