org.gridbus.broker.util
Class TokenStack

java.lang.Object
  extended by org.gridbus.broker.util.TokenStack

public class TokenStack
extends java.lang.Object

This class has utility methods for storing tokens of strings in a stack

Author:
Srikumar Venugopal (srikumar@cs.mu.oz.au)

Constructor Summary
TokenStack()
          Constructor for TokenStack.
 
Method Summary
 boolean isEmpty()
          Returns whether the stack is empty or not
 java.lang.String pop()
          Returns a string popped off the top of the stack
 void push(java.lang.String token)
          Pushes a string token onto the stack
 int size()
          Returns the size of the stack
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenStack

public TokenStack()
Constructor for TokenStack.

Method Detail

push

public void push(java.lang.String token)
Pushes a string token onto the stack

Parameters:
token -

pop

public java.lang.String pop()
Returns a string popped off the top of the stack

Returns:
string at the top of the stack

isEmpty

public boolean isEmpty()
Returns whether the stack is empty or not

Returns:
true if the stack is empty

size

public int size()
Returns the size of the stack

Returns:
stack size