jwo.utils.expression
Class Token

java.lang.Object
  extended by jwo.utils.expression.Token

public class Token
extends Object

A simple token for storing a type, value pair. Modified from original code described at www.devx.com/premier/mgznarch/javapro/2001/05may01/ps0105/ps0105.asp.

Version:
2.3, 15th February, 2001, modified 11th April, 2006.
Author:
Daniel Savarese, modified by Jo Wood.

Constructor Summary
Token(Object type, Object value)
          Creates a token of the given type storing the given value.
 
Method Summary
 Object getType()
          Reports the type of object stored by token.
 Object getValue()
          Reports the value of the stored token.
 String toString()
          Provides a textual description of the object stored by the token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(Object type,
             Object value)
Creates a token of the given type storing the given value.

Parameters:
type - Type of token to store.
value - Value of token to store.
Method Detail

getValue

public Object getValue()
Reports the value of the stored token.

Returns:
Object stored by token.

getType

public Object getType()
Reports the type of object stored by token.

Returns:
Type of object stored by token.

toString

public String toString()
Provides a textual description of the object stored by the token.

Overrides:
toString in class Object
Returns:
Textual description of the object stored by the token.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009