--- /dev/null
+package jrw.sp;
+
+public class Name {
+ public final Namespace ns;
+ public final String local;
+
+ public Name(Namespace ns, String local) {
+ if(local == null)
+ throw(new NullPointerException());
+ this.ns = ns;
+ this.local = local;
+ }
+
+ public Name(String local) {
+ this(null, local);
+ }
+
+ public int hashCode() {
+ return(System.identityHashCode(ns) + local.hashCode());
+ }
+
+ private boolean equals(Name that) {
+ return((this.ns == that.ns) && this.local.equals(that.local));
+ }
+
+ public boolean equals(Object x) {
+ return((x instanceof Name) && equals((Name)x));
+ }
+
+ public String toString() {
+ return((ns == null) ? local : (ns.prefabb + ":" + local));
+ }
+}