No examples for this method.
Frequently called with: [Clear]
-1
java.lang.Object | ||||
↳ | java.util.AbstractCollection<E> | |||
↳ | java.util.AbstractList<E> | |||
↳ | java.util.Vector<E> | |||
↳ | java.util.Stack<E> |
Stack
is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables users to pop to and push from the stack, including null objects. There is no limit to the size of the stack.
[Expand]
Inherited Fields
|
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.Vector
|
||||||||||||||||||||
From class java.util.AbstractList
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructs a stack with the default size of
Vector .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Returns whether the stack is empty or not.
|
||||||||||
|
Returns the element at the top of the stack without removing it.
|
||||||||||
|
Returns the element at the top of the stack and removes it.
|
||||||||||
|
Pushes the specified object onto the top of the stack.
|
||||||||||
|
Returns the index of the first occurrence of the object, starting from the top of the stack.
|
[Expand]
Inherited Methods
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.util.Vector
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From class java.util.AbstractList
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From class java.util.AbstractCollection
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From class java.lang.Object
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From interface java.lang.Iterable | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From interface java.util.Collection
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From interface java.util.List
|
Returns whether the stack is empty or not.
true
if the stack is empty, false
otherwise. Returns the element at the top of the stack without removing it.
EmptyStackException | if the stack is empty. |
---|
Returns the element at the top of the stack and removes it.
EmptyStackException | if the stack is empty. |
---|
Returns the index of the first occurrence of the object, starting from the top of the stack.
o | the object to be searched. |
---|