public class Atom { // Methods public static Atom create(String s); public boolean equals(Object that); public int hashCode(); public String toString(); }
This is a general purpose object to allow efficient sharing of duplicate strings in the system. It does this by creating a global HashTable of all Atoms that have been constructed.
public static Atom create(String s);Create a Atom object for this string. Atoms are case sensitive - i.e. it assumes any case folding has already been done.
public boolean equals(Object that);Return whether this Atom is equal to another given Atom.
public int hashCode();Return the hash code for the name.
Return Value
Returns returns the hash code for the name.
public String toString();Return the string represented by the Atom.