net.sourceforge.chaperon.model.symbol
Class Symbol

java.lang.Object
  extended by net.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.5 2003/12/09 19:55:53 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.
 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

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.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this symbol.

hashCode

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

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code value for the symbol.

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
o - Another object
Returns:
True, if the symbols are equal.


Copyright ? 2003 Chaperon project. All Rights Reserved.