org.apache.commons.collections
public class: ArrayStack [javadoc |
source]
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.apache.commons.collections.ArrayStack
All Implemented Interfaces:
Buffer, List, Serializable, RandomAccess, Cloneable, Collection
An implementation of the
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 #remove() method removes
them from the top down.
Unlike Stack, ArrayStack accepts null entries.
Also see:
- java.util.Stack
- since:
Commons - Collections 1.0
- version:
$ - Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
- author:
Craig - R. McClanahan
- author:
Paul - Jack
- author:
Stephen - Colebourne
| Methods from java.util.ArrayList: |
|---|
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
| Methods from java.util.AbstractList: |
|---|
|
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subList |
| Methods from java.util.AbstractCollection: |
|---|
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |