Tea Java Runtime API
Version 3.2.4

com.pdmfc.tea.runtime
Class SObjSymbol

java.lang.Object
  extended by com.pdmfc.tea.runtime.SObjSymbol

public class SObjSymbol
extends java.lang.Object

Instances of this class represent a symbol in a Tea program. This class is also manages all the existing symbols in a Tea program.


Method Summary
static SObjSymbol addSymbol(java.lang.String name)
          Adds a new symbol to the symbol table and returns the associated object.
 java.lang.String getName()
          Fetches the name of this symbol.
static SObjSymbol getSymbol(java.lang.String name)
          Finds the object associated with the symbol named name.
 int hashCode()
          The hash code of this object.
 java.lang.String toString()
          Retrieves a string representation for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

hashCode

public int hashCode()
The hash code of this object. It is set when the object is initialized. There is no nee to reimplement the equals()SObjSymbol instances with the same name, so comparison for equality can be made on an object basis.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code of this object.

getName

public java.lang.String getName()
Fetches the name of this symbol.

Returns:
A String with the name of this symbol.

toString

public java.lang.String toString()
Retrieves a string representation for this object. This will be the name for this symbol.

Overrides:
toString in class java.lang.Object
Returns:
A string representing the name of this symbol.

getSymbol

public static SObjSymbol getSymbol(java.lang.String name)
Finds the object associated with the symbol named name. If there is no object with that name in the symbol table, a null object is returned.

Parameters:
name - The name of the symbol to search for.
Returns:
Reference to the object representing the symbol, or null if the symbol was not on the symbol table.

addSymbol

public static SObjSymbol addSymbol(java.lang.String name)
Adds a new symbol to the symbol table and returns the associated object. There is only one object for each symbol.

Parameters:
name - String with the name of the symbol to be added to the symbol table.
Returns:
Reference to the object representing the symbol.

Tea Java Runtime API
Version 3.2.4

© 2009 PDM&FC, All Rights Reserved.