public abstract class AbstractIntStack extends AbstractStack<java.lang.Integer> implements IntStack
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.Integer |
peek(int i)
Delegates to the corresponding type-specific method.
|
int |
peekInt(int i)
Delegates to the corresponding generic method.
|
java.lang.Integer |
pop()
Delegates to the corresponding type-specific method.
|
int |
popInt()
Delegates to the corresponding generic method.
|
void |
push(int k)
Delegates to the corresponding generic method.
|
void |
push(java.lang.Integer o)
Delegates to the corresponding type-specific method.
|
java.lang.Integer |
top()
Delegates to the corresponding type-specific method.
|
int |
topInt()
Delegates to the corresponding generic method.
|
public void push(java.lang.Integer o)
public java.lang.Integer pop()
public java.lang.Integer top()
top in interface Stack<java.lang.Integer>top in class AbstractStack<java.lang.Integer>public java.lang.Integer peek(int i)
peek in interface Stack<java.lang.Integer>peek in class AbstractStack<java.lang.Integer>i - an index from the stop of the stack (0 represents the top).i-th element on the stack.public void push(int k)
push in interface IntStackStack.push(Object)public int popInt()
popInt in interface IntStackStack.pop()public int topInt()
topInt in interface IntStackStack.top()public int peekInt(int i)
peekInt in interface IntStackStack.peek(int)