Package com.ibm.wala.util.collections
Class IntStack
- java.lang.Object
-
- com.ibm.wala.util.collections.IntStack
-
public class IntStack extends java.lang.Object
A stack of integer primitives. This should be more efficient than a java.util.Stack
-
-
Constructor Summary
Constructors Constructor Description IntStack()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get(int i)
boolean
isEmpty()
int
peek()
int
pop()
pop the stackvoid
push(int i)
int
size()
-
-
-
Method Detail
-
push
public void push(int i)
-
peek
public int peek()
- Returns:
- the int at the top of the stack
-
pop
public int pop()
pop the stack- Returns:
- the int at the top of the stack
-
isEmpty
public boolean isEmpty()
- Returns:
- true iff the stack is empty
-
size
public int size()
- Returns:
- the number of elements in the stack.
-
get
public int get(int i)
- Returns:
- the ith int from the bottom of the stack
-
-