net.sourceforge.chaperon.model.symbol
Class Symbol

java.lang.Object
  extended bynet.sourceforge.chaperon.model.symbol.Symbol
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EmptyList, Nonterminal, Terminal

public abstract class Symbol
extends java.lang.Object
implements java.io.Serializable

This class represent a symbol

Version:
CVS $Id: Symbol.java,v 1.7 2004/01/15 20:13:35 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Constructor Summary
Symbol(java.lang.String name)
          Create a symbol.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the symbol with another symbol.
 java.lang.String getName()
          Returns the name of this symbol
 int hashCode()
          Returns a hash code value for the symbol.
 void setName(java.lang.String name)
           
 java.lang.String toString()
          Returns the string representation of this symbol.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Symbol

public Symbol(java.lang.String name)
Create a symbol.

Parameters:
name - Name of symbol.
Method Detail

setName

public void setName(java.lang.String name)

getName

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

Returns:
Name of this symbol.

toString

public java.lang.String toString()
Returns the string representation of this symbol.

Returns:
String representation of this symbol.

hashCode

public int hashCode()
Returns a hash code value for the symbol.

Returns:
Hash code value for the symbol.

equals

public boolean equals(java.lang.Object o)
Compares the symbol with another symbol.

Parameters:
o - Another object
Returns:
True, if the symbols are equal.


Copyright ? 2003 Chaperon project. All Rights Reserved.