Class Symbol
java.lang.Object
|
+----Symbol
- abstract class Symbol
- extends Object
- implements Cloneable
Any class that needs to be in a symbol table is a descendant of
Symbol. The only field is a name String for looking up symbols.
- Author:
- Peter Sagerson, petersag@wpi.edu
-
name
-
-
Symbol(String)
-
-
nameOf()
- Just returns the name.
-
toString()
- Exactly the same as nameOf().
name
private String name
Symbol
public Symbol(String str) throws NameLengthException
- Throws: NameLengthException
- if str is over 31 characters
nameOf
public String nameOf()
- Just returns the name.
toString
public String toString()
- Exactly the same as nameOf().
- Overrides:
- toString in class Object