Class ArrayStack<E>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.apache.tomcat.util.digester.ArrayStack<E>
Type Parameters:
E - Type of object in this stack
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>

public class ArrayStack<E> extends ArrayList<E>

Imported copy of the ArrayStack class from Commons Collections, which was the only direct dependency from Digester.

WARNING - This class is public solely to allow it to be used from subpackages of org.apache.commons.digester. It should not be considered part of the public API of Commons Digester. If you want to use such a class yourself, you should use the one from Commons Collections directly.

An implementation of the Stack API that is based on an ArrayList instead of a Vector, so it is not synchronized to protect against multi-threaded access. The implementation is therefore operates faster in environments where you do not need to worry about multiple thread contention.

Unlike Stack, ArrayStack accepts null entries.

Since:
Digester 1.6 (from Commons Collections 1.0)
See Also: