it.unimi.dsi.fastutil.chars
Class AbstractCharStack

java.lang.Object
  extended by it.unimi.dsi.fastutil.AbstractStack<Character>
      extended by it.unimi.dsi.fastutil.chars.AbstractCharStack
All Implemented Interfaces:
CharStack, Stack<Character>

public abstract class AbstractCharStack
extends AbstractStack<Character>
implements CharStack

An abstract class providing basic methods for implementing a type-specific stack interface.

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).


Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Method Detail

push

public void push(Character o)
Delegates to the corresponding type-specific method.

Specified by:
push in interface Stack<Character>
Parameters:
o - the object that will become the new top of the stack.

pop

public Character pop()
Delegates to the corresponding type-specific method.

Specified by:
pop in interface Stack<Character>
Returns:
the top of the stack.

top

public Character top()
Delegates to the corresponding type-specific method.

Specified by:
top in interface Stack<Character>
Overrides:
top in class AbstractStack<Character>
Returns:
the top of the stack.

peek

public Character peek(int i)
Delegates to the corresponding type-specific method.

Specified by:
peek in interface Stack<Character>
Overrides:
peek in class AbstractStack<Character>
Returns:
the i-th element on the stack; 0 represents the top.

push

public void push(char k)
Delegates to the corresponding generic method.

Specified by:
push in interface CharStack
See Also:
Stack.push(Object)

popChar

public char popChar()
Delegates to the corresponding generic method.

Specified by:
popChar in interface CharStack
See Also:
Stack.pop()

topChar

public char topChar()
Delegates to the corresponding generic method.

Specified by:
topChar in interface CharStack
See Also:
Stack.top()

peekChar

public char peekChar(int i)
Delegates to the corresponding generic method.

Specified by:
peekChar in interface CharStack
See Also:
Stack.peek(int)