Class Stack

  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.Vector
              extended by org.apache.lenya.util.Stack
All Implemented Interfaces:, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class Stack
extends java.util.Vector

A helper class to implement a stack. Unlike java.util.Stack, this stack discards old elements once maxsize is reached.

See Also:
Stack, Serialized Form

Field Summary
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
Fields inherited from class java.util.AbstractList
Constructor Summary
Stack(int _maxsize)
          Creates a new Stack object.
Method Summary
 void push(java.lang.Object object)
          Push an object on the stack
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
iterator, listIterator, listIterator

Constructor Detail


public Stack(int _maxsize)
Creates a new Stack object.

_maxsize - The maximum size of the stack
Method Detail


public void push(java.lang.Object object)
Push an object on the stack

object - The object

Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.