sdf
Class SDF_Variable

java.lang.Object
  extended by sdf.SDF_Variable
All Implemented Interfaces:
Serializable, Variable

public class SDF_Variable
extends Object
implements Variable

This implementation of the Variable interface represents variables as simple strings.

Author:
Antoine De Groote
See Also:
Serialized Form

Constructor Summary
SDF_Variable(String name)
          Constructor:
 
Method Summary
 boolean equals(Object o)
          Compares for equality: SDF_Variables are equal if, and only if they have the same name.
 int hashCode()
          Produces the hashcode of the name string object.
 String toString()
          Converts this variable into a string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SDF_Variable

public SDF_Variable(String name)
Constructor:

Parameters:
name - The name of the variable.
Method Detail

hashCode

public int hashCode()
Produces the hashcode of the name string object.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Compares for equality: SDF_Variables are equal if, and only if they have the same name.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Converts this variable into a string.

Overrides:
toString in class Object
Returns:
The variable's string value.