public abstract class AbstractCharStack extends AbstractStack<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 |
---|---|
Character |
peek(int i)
Delegates to the corresponding type-specific method.
|
char |
peekChar(int i)
Delegates to the corresponding generic method.
|
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(Character o)
Delegates to the corresponding type-specific method.
|
Character |
top()
Delegates to the corresponding type-specific method.
|
char |
topChar()
Delegates to the corresponding generic method.
|
public void push(Character o)
public Character pop()
public Character top()
public Character peek(int i)
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)