Class Atom

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.

Methods

create 

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.

equals 

public boolean equals(Object that);

Return whether this Atom is equal to another given Atom.

hashCode 

public int hashCode();

Return the hash code for the name.

Return Value

Returns returns the hash code for the name.

toString 

public String toString();

Return the string represented by the Atom.