|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.parboiled.common.IntArrayStack
public class IntArrayStack
Nested Class Summary | |
---|---|
static class |
IntArrayStack.UnderflowException
|
Constructor Summary | |
---|---|
IntArrayStack()
|
Method Summary | |
---|---|
void |
clear()
Empties the stack. |
void |
getElements(int[] destArray,
int destStartIndex)
Copies all elements currently on the stack into the given array. |
boolean |
isEmpty()
Tests if the stack is empty. |
int |
peek()
Returns the item at the top of the stack without removing it. |
int |
pop()
Removes the most recently inserted item from the stack. |
void |
push(int x)
Pushes a new item onto the stack. |
int |
size()
Returns the number of element currently on the stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntArrayStack()
Method Detail |
---|
public boolean isEmpty()
public int size()
public void getElements(int[] destArray, int destStartIndex)
destArray
- the arraydestStartIndex
- the index to start copying intopublic void clear()
public int peek()
IntArrayStack.UnderflowException
- if the stack is empty.public int pop()
IntArrayStack.UnderflowException
- if the stack is empty.public void push(int x)
x
- the item to add.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |