An implementation of the {@link java.util.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.
The removal order of an
ArrayStack
is based on insertion order: The most recently added element is removed first. The iteration order is
not the same as the removal order. The iterator returns elements from the bottom up, whereas the {@link #remove()} method removesthem from the top down.
Unlike
Stack
,
ArrayStack
accepts null entries.
@author Craig R. McClanahan
@author Paul Jack
@author Matt Hall, John Watkinson, Stephen Colebourne
@version $Revision: 1.1 $ $Date: 2005/10/11 17:05:19 $
@see java.util.Stack
@since Commons Collections 1.0