mondrian.util
Class ArrayStack<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
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.
- Author:
- jhyde
- See Also:
- Serialized Form
| 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 |
ArrayStack
public ArrayStack()
- Default constructor.
ArrayStack
public ArrayStack(ArrayStack<E> toCopy)
- Copy Constructor
- Parameters:
toCopy - Instance of ArrayStack to copy.
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().