fr.umlv.tatoo.runtime.tools
Class GenericStack

java.lang.Object
  extended by fr.umlv.tatoo.runtime.tools.GenericStack

public class GenericStack
extends Object

A generic auto-resizeable stack that can store primitive type and objects used by the parser evaluator generated by Tatoo Tools.

Author:
Remi

Constructor Summary
GenericStack(int capacity)
          Creates a stack with a specific capacity.
 
Method Summary
 boolean pop_boolean()
          Pop a boolean from the stack.
 byte pop_byte()
          Pop a byte from the stack.
 char pop_char()
          Pop a character from the stack.
 double pop_double()
          Pop a double from the stack.
 float pop_float()
          Pop a float from the stack.
 int pop_int()
          Pop an integer from the stack.
 long pop_long()
          Pop a long from the stack.
 Object pop_Object()
          Pop an object from the stack.
 short pop_short()
          Pop a short from the stack.
 void push_boolean(boolean value)
          Push a boolean on the stack.
 void push_byte(byte value)
          Push a byte on the stack.
 void push_char(char value)
          Push a character on the stack.
 void push_double(double value)
          Push a double on the stack.
 void push_float(float value)
          Push a float on the stack.
 void push_int(int value)
          Push an integer on the stack.
 void push_long(long value)
          Push a long on the stack.
 void push_Object(Object value)
          Push an object on the stack.
 void push_short(short value)
          Push a short on the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericStack

public GenericStack(int capacity)
Creates a stack with a specific capacity.

Parameters:
capacity - the initial capacity of the stack before a resize.
Method Detail

push_Object

public void push_Object(Object value)
Push an object on the stack.

Parameters:
value - an object.

pop_Object

public Object pop_Object()
Pop an object from the stack.

Returns:
the object on top of the stack.

push_int

public void push_int(int value)
Push an integer on the stack.

Parameters:
value - an integer.

pop_int

public int pop_int()
Pop an integer from the stack.

Returns:
the integer on top of the stack.

push_float

public void push_float(float value)
Push a float on the stack.

Parameters:
value - a float.

pop_float

public float pop_float()
Pop a float from the stack.

Returns:
the float on top of the stack.

push_char

public void push_char(char value)
Push a character on the stack.

Parameters:
value - a character.

pop_char

public char pop_char()
Pop a character from the stack.

Returns:
the character on top of the stack.

push_short

public void push_short(short value)
Push a short on the stack.

Parameters:
value - a short.

pop_short

public short pop_short()
Pop a short from the stack.

Returns:
the sh on top of the stack.

push_byte

public void push_byte(byte value)
Push a byte on the stack.

Parameters:
value - a byte.

pop_byte

public byte pop_byte()
Pop a byte from the stack.

Returns:
the byte on top of the stack.

push_boolean

public void push_boolean(boolean value)
Push a boolean on the stack.

Parameters:
value - a boolean.

pop_boolean

public boolean pop_boolean()
Pop a boolean from the stack.

Returns:
the boolean on top of the stack.

push_long

public void push_long(long value)
Push a long on the stack.

Parameters:
value - a long.

pop_long

public long pop_long()
Pop a long from the stack.

Returns:
the long on top of the stack.

push_double

public void push_double(double value)
Push a double on the stack.

Parameters:
value - a double.

pop_double

public double pop_double()
Pop a double from the stack.

Returns:
the double on top of the stack.