public abstract class AbstractCharStack extends AbstractStack<java.lang.Character> implements CharStack
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.Character |
peek(int i)
Delegates to the corresponding type-specific method.
|
char |
peekChar(int i)
Delegates to the corresponding generic method.
|
java.lang.Character |
pop()
Delegates to the corresponding type-specific method.
|
char |
popChar()
Delegates to the corresponding generic method.
|
void |
push(char k)
Delegates to the corresponding generic method.
|
void |
push(java.lang.Character o)
Delegates to the corresponding type-specific method.
|
java.lang.Character |
top()
Delegates to the corresponding type-specific method.
|
char |
topChar()
Delegates to the corresponding generic method.
|
public void push(java.lang.Character o)
public java.lang.Character pop()
public java.lang.Character top()
top
in interface Stack<java.lang.Character>
top
in class AbstractStack<java.lang.Character>
public java.lang.Character peek(int i)
peek
in interface Stack<java.lang.Character>
peek
in class AbstractStack<java.lang.Character>
i
- an index from the stop of the stack (0 represents the top).i
-th element on the stack.public void push(char k)
push
in interface CharStack
Stack.push(Object)
public char popChar()
popChar
in interface CharStack
Stack.pop()
public char topChar()
topChar
in interface CharStack
Stack.top()
public char peekChar(int i)
peekChar
in interface CharStack
Stack.peek(int)