mondrian.util
Class ArrayStack<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by mondrian.util.ArrayStack<E>
Type Parameters:
E - Element type
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess

public class ArrayStack<E>
extends ArrayList<E>

Stack implementation based on ArrayList.

More efficient than Stack, which extends Vector and is therefore synchronized whether you like it or not.

Version:
$Id: //open/mondrian/src/main/mondrian/util/ArrayStack.java#1 $
Author:
jhyde
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ArrayStack()
           
 
Method Summary
 E peek()
          Analogous to Stack.peek().
 E pop()
          Analogous to Stack.pop().
 E push(E item)
          Analogous to Stack.push(E).
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, 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
 

Constructor Detail

ArrayStack

public ArrayStack()
Method Detail

push

public E push(E item)
Analogous to Stack.push(E).


pop

public E pop()
Analogous to Stack.pop().


peek

public E peek()
Analogous to Stack.peek().


Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads