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.
Unlike Stack
, ArrayStack
accepts null entries.
Note: From version 4.0 onwards, this class does not implement the removed {@code Buffer} interface anymore. @see java.util.Stack @since 1.0 @version $Id: ArrayStack.java 1477779 2013-04-30 18:55:24Z tn $ @deprecated use {@link java.util.ArrayDeque} instead (available from Java 1.6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|