org.holtz.zoe.zoel
Class Stack<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.holtz.zoe.zoel.Stack<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess

public class Stack<T>
extends java.util.ArrayList<T>

A stack that can forget its deepest elements and can have a default element when empty.

Author:
Brian Holtz
See Also:
Serialized Form

Field Summary
 T val2PopWhenEmpty
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Stack()
           
 
Method Summary
 boolean empty()
           
 T peek()
           
 T peekBottom()
           
 void poke(T o)
           
 T pop()
           
 void push(T o)
           
 void push(T o, int maxSize)
           
 java.lang.String toString(int n)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

val2PopWhenEmpty

public T val2PopWhenEmpty
Constructor Detail

Stack

public Stack()
Method Detail

push

public void push(T o)

push

public void push(T o,
                 int maxSize)

pop

public T pop()

empty

public boolean empty()

peek

public T peek()

peekBottom

public T peekBottom()

poke

public void poke(T o)

toString

public java.lang.String toString(int n)