Package com.ibm.wala.util.collections
Class IntStack
- java.lang.Object
-
- com.ibm.wala.util.collections.IntStack
-
public class IntStack extends 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 boolean
isEmpty()
int
peek()
int
pop()
pop the stackvoid
push(int i)
-
-
-
Method Detail
-
push
public void push(int i)
- Parameters:
i
-
-
peek
public int peek() throws EmptyStackException
- Returns:
- the int at the top of the stack
- Throws:
EmptyStackException
-
pop
public int pop() throws EmptyStackException
pop the stack- Returns:
- the int at the top of the stack
- Throws:
EmptyStackException
-
isEmpty
public boolean isEmpty()
- Returns:
- true iff the stack is empty
-
-