public abstract class AbstractShortStack extends AbstractStack<Short> implements ShortStack
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 |
|---|---|
Short |
peek(int i)
Deprecated.
Please use the corresponding type-specific method instead.
|
short |
peekShort(int i)
Peeks at an element on the stack (optional operation).
|
Short |
pop()
Deprecated.
Please use the corresponding type-specific method instead.
|
short |
popShort()
Pushes the given object on the stack.
|
void |
push(short k)
Pushes the given object on the stack.
|
void |
push(Short o)
Deprecated.
Please use the corresponding type-specific method instead.
|
Short |
top()
Deprecated.
Please use the corresponding type-specific method instead.
|
short |
topShort()
Peeks at the top of the stack (optional operation).
|
public void push(short k)
This implementation delegates to the corresponding generic method.
push in interface ShortStackStack.push(Object)public short popShort()
This implementation delegates to the corresponding generic method.
popShort in interface ShortStackStack.pop()public short topShort()
This implementation delegates to the corresponding generic method.
topShort in interface ShortStackStack.top()public short peekShort(int i)
This implementation delegates to the corresponding generic method.
peekShort in interface ShortStackStack.peek(int)@Deprecated public void push(Short o)
This implementation delegates to the corresponding type-specific method.
push in interface ShortStackpush in interface Stack<Short>o - the object that will become the new top of the stack.@Deprecated public Short pop()
This implementation delegates to the corresponding type-specific method.
pop in interface ShortStackpop in interface Stack<Short>@Deprecated public Short top()
This implementation delegates to the corresponding type-specific method.
top in interface ShortStacktop in interface Stack<Short>top in class AbstractStack<Short>@Deprecated public Short peek(int i)
This implementation just throws an UnsupportedOperationException.
This implementation delegates to the corresponding type-specific method.
peek in interface ShortStackpeek in interface Stack<Short>peek in class AbstractStack<Short>i - an index from the stop of the stack (0 represents the top).i-th element on the stack.