| Constructor and Description |
|---|
FixedStack(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the stack
|
boolean |
isEmpty()
Tests if stack is empty
|
T |
peek()
Check element on top of the stack
|
T |
pop()
Removes the object at the top of this stack
and returns that object as the value
|
void |
push(T element)
Pushes an item onto the top of this stack
|
int |
size()
Returns the number of items in this stack
|
T[] |
toArray(Class<T[]> arrayType)
Converts stack into the array,
ordered by the push order (the latest items are the first in array)
|
public void push(T element)
IStackpublic T pop()
IStackpublic int size()
IStackpublic boolean isEmpty()
IStackpublic void clear()
IStackCopyright © 2020. All rights reserved.