public class Name { // Constructors public String getName(); // Methods public static Name create(String name); public static Name create(char val[], int offset, int len); public static Name create(String name, String ns); public static Name create(String name, Atom nameSpace); public boolean equals(Object that); public Atom getNameSpace(); public int hashCode(); public String toString(); }
This is a general purpose name object to allow efficient sharing of duplicate names in the system. It does this by creating a global HashTable of all names that have been constructed. Names are different from Atoms in that they can be qualified by a separate namespace string - so in effect that are compound atoms.
public String getName();The constructor is private because all names should be constructed using the static Name.create() methods
public static Name create(String name);Create an unqualified Name.
public static Name create(char val[], int offset, int len);
public static Name create(String name, String ns);Create a Name object for the given name and namespace. The strings are case sensitive.
public static Name create(String name, Atom nameSpace);Create a Name object for the given name and namespace where the name and Namespace are already Atoms. The strings are case sensitive.
public boolean equals(Object that);
public Atom getNameSpace();
public int hashCode();return the hash code for this name object
public String toString();