| Constructor and Description |
|---|
ArrayStack()
Creates an empty Stack.
|
ArrayStack(int size)
Creates an empty Stack with an initial size.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Object o) |
boolean |
isEmpty()
Tests if this stack is empty.
|
E |
peek()
Returns the object at the top of this stack without removing it.
|
E |
peekWithNull()
Returns the object at the top of this stack without removing it.
|
protected E |
peekZero(boolean retNull) |
E |
pop()
Removes the object at the top of this stack and returns that object as
the value of this function.
|
E |
push(E item)
Pushes an item onto the top of this stack.
|
int |
size() |
public ArrayStack(int size)
public ArrayStack()
public E pop()
protected E peekZero(boolean retNull)
public E peek()
public E peekWithNull()
public boolean isEmpty()
public int size()
public boolean contains(Object o)
Copyright © 2014. All Rights Reserved.