| An abstract class providing basic methods for implementing the
Stack interface.
This class just defines
Stack.top as
Stack.peek(int) peek(0) , and
Stack.peek(int) as throwing an
UnsupportedOperationException .
Subclasses of this class may choose to implement just
Stack.push(Object) ,
Stack.pop and
Stack.isEmpty , or (but this is not
required) go farther and implement
Stack.top , or even
Stack.peek(int) .
|