|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectealet.LongStack
public class LongStack
A stack algorithm implementation based on long data type.
| Constructor Summary | |
|---|---|
LongStack()
Creates a new instance of Stack |
|
LongStack(int size)
Creates a new instance of Stack with new length |
|
| Method Summary | |
|---|---|
long |
get(int index)
Returns indexed value from the stack |
int |
getTop()
Returns the top position of the stack |
boolean |
isEmpty()
Returns true if the stack is empty, or false if it is not |
boolean |
isFull()
Returns true if the stack is full, or false if it is not |
long |
peek()
Allows Peeking into the stack by showing the top most of element |
long |
pop()
Pops is the top value if the stack is not empty |
void |
push(long value)
Pushes a new value if the stack is not full |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LongStack()
public LongStack(int size)
| Method Detail |
|---|
public boolean isFull()
public boolean isEmpty()
public void push(long value)
public long pop()
public int getTop()
public long get(int index)
public long peek()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||