|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.uima.internal.util.IntVector
org.apache.uima.internal.util.IntStack
public class IntStack
A stack of integers. Follows Stack pretty closely, except that push()
returns the position of the added element in the stack. Inherits from IntVector, so those methods
are also available.
| Field Summary |
|---|
| Fields inherited from class org.apache.uima.internal.util.IntVector |
|---|
array, pos |
| Constructor Summary | |
|---|---|
IntStack()
Creates an empty stack. |
|
IntStack(int capacity)
Creates an empty stack. |
|
IntStack(int capacity,
int growth_factor,
int multiplication_limit)
Creates an empty stack with specified capacity, growth_factor and multiplication limit |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the stack. |
boolean |
empty()
Check if stack is empty. |
int |
peek()
Look at the topmost element in the stack. |
int |
pop()
Pop an element from the stack. |
int |
push(int i)
Push a new element on the stack. |
| Methods inherited from class org.apache.uima.internal.util.IntVector |
|---|
add, add, contains, copy, ensure_size, equals, fill, get, getArray, hashCode, indexOf, position, put, remove, removeAllElements, set, setSize, size, toArray, toArrayCopy, toString, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntStack()
public IntStack(int capacity)
public IntStack(int capacity,
int growth_factor,
int multiplication_limit)
| Method Detail |
|---|
public int push(int i)
i - The element to be pushed.
i after it's been added.public int pop()
public int peek()
public boolean empty()
true, if stack is empty; false, else.public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||