at.jku.ssw
Class Stack

java.lang.Object
  extended by at.jku.ssw.Stack

public abstract class Stack
extends java.lang.Object

A LIFO (last-in-first-out) stack of characters.


Constructor Summary
Stack()
           
 
Method Summary
abstract  Iterator iterator()
          Returns an iterator of the values on this stack.
abstract  char pop()
          Removes the value at the top of this stack and returns that value as the value of this function.
abstract  void push(char value)
          Pushes a value onto the top of this stack.
abstract  int size()
          Returns the number of values on this stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stack

public Stack()
Method Detail

push

public abstract void push(char value)
Pushes a value onto the top of this stack.


pop

public abstract char pop()
                  throws java.util.NoSuchElementException
Removes the value at the top of this stack and returns that value as the value of this function.

Throws:
java.util.NoSuchElementException

size

public abstract int size()
Returns the number of values on this stack.


iterator

public abstract Iterator iterator()
Returns an iterator of the values on this stack.