public abstract class AbstractByteStack extends AbstractStack<java.lang.Byte> implements ByteStack
To create a type-specific stack, you need both object methods and primitive-type methods. However, if you inherit from this class you need just one (anyone).
Modifier and Type | Method and Description |
---|---|
java.lang.Byte |
peek(int i)
Delegates to the corresponding type-specific method.
|
byte |
peekByte(int i)
Delegates to the corresponding generic method.
|
java.lang.Byte |
pop()
Delegates to the corresponding type-specific method.
|
byte |
popByte()
Delegates to the corresponding generic method.
|
void |
push(byte k)
Delegates to the corresponding generic method.
|
void |
push(java.lang.Byte o)
Delegates to the corresponding type-specific method.
|
java.lang.Byte |
top()
Delegates to the corresponding type-specific method.
|
byte |
topByte()
Delegates to the corresponding generic method.
|
public void push(java.lang.Byte o)
public java.lang.Byte pop()
public java.lang.Byte top()
top
in interface Stack<java.lang.Byte>
top
in class AbstractStack<java.lang.Byte>
public java.lang.Byte peek(int i)
peek
in interface Stack<java.lang.Byte>
peek
in class AbstractStack<java.lang.Byte>
i
- an index from the stop of the stack (0 represents the top).i
-th element on the stack.public void push(byte k)
push
in interface ByteStack
Stack.push(Object)
public byte popByte()
popByte
in interface ByteStack
Stack.pop()
public byte topByte()
topByte
in interface ByteStack
Stack.top()
public byte peekByte(int i)
peekByte
in interface ByteStack
Stack.peek(int)