public abstract class AbstractShortStack extends AbstractStack<java.lang.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 |
---|---|
java.lang.Short |
peek(int i)
Delegates to the corresponding type-specific method.
|
short |
peekShort(int i)
Delegates to the corresponding generic method.
|
java.lang.Short |
pop()
Delegates to the corresponding type-specific method.
|
short |
popShort()
Delegates to the corresponding generic method.
|
void |
push(short k)
Delegates to the corresponding generic method.
|
void |
push(java.lang.Short o)
Delegates to the corresponding type-specific method.
|
java.lang.Short |
top()
Delegates to the corresponding type-specific method.
|
short |
topShort()
Delegates to the corresponding generic method.
|
public void push(java.lang.Short o)
public java.lang.Short pop()
public java.lang.Short top()
top
in interface Stack<java.lang.Short>
top
in class AbstractStack<java.lang.Short>
public java.lang.Short peek(int i)
peek
in interface Stack<java.lang.Short>
peek
in class AbstractStack<java.lang.Short>
i
- an index from the stop of the stack (0 represents the top).i
-th element on the stack.public void push(short k)
push
in interface ShortStack
Stack.push(Object)
public short popShort()
popShort
in interface ShortStack
Stack.pop()
public short topShort()
topShort
in interface ShortStack
Stack.top()
public short peekShort(int i)
peekShort
in interface ShortStack
Stack.peek(int)