org.onemind.commons.java.datastructure
Class Stack

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byjava.util.Stack
                  extended byorg.onemind.commons.java.datastructure.Stack
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class Stack
extends java.util.Stack

An extension of java.util.Stack to have popUntil and pushReturnSize method

Version:
$Id: Stack.java,v 1.2 2004/08/26 12:33:16 thlee Exp $ $Name: $
Author:
TiongHiang Lee (thlee@onemindsoft.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Stack()
          {@inheritDoc}
 
Method Summary
 void popUntil(int i)
          Pop until the stack reach size i
 int pushReturnSize(java.lang.Object o)
          Push the object ot the stack and return the size before pushing the object in
 
Methods inherited from class java.util.Stack
empty, peek, pop, push, search
 
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

Stack

public Stack()
{@inheritDoc}

Method Detail

pushReturnSize

public int pushReturnSize(java.lang.Object o)
Push the object ot the stack and return the size before pushing the object in

Parameters:
o - the object
Returns:
the size before the push

popUntil

public void popUntil(int i)
Pop until the stack reach size i

Parameters:
i - the size


Copyright © 2004-2006 . All Rights Reserved.