Convenient implementation of a Last In First Out (LIFO) stack. This
implementation differs from the one in java.util.Stack in two ways.
First, like most of the collection APIs, it is unsynchronized for better
performance when synchronization is not required. If a synchronized stack
is required, you can use the
Collections.synchronizedCollection()
method to retrieve a synchronized instance.
Second, it does not expose its internal implementation via its superclass.
Extending AbstractCollection instead of Vector allows
objects of this class to be used interchangably with other collection
framework classes without exposing its internal implementation.