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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|