package jalf;

import static jalf.util.ValidationUtils.validateNotNull;

/**
 * @author amirm
 */
public class AttrName {
    public static AttrName attr(String name) {
        // TODO use a concurrent WeakHashMap to keep immutable AttrName(s)
        return new AttrName(name);
    }

    private String name;

    private AttrName(String name) {
        validateNotNull("Parameter 'name' must be non-null.", name);
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AttrName attrName = (AttrName) o;

        if (!name.equals(attrName.name)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return name.hashCode();
    }
}

@@ -112,16 +112,48 @@
 AttrName
+ implements Comparable%3CAttrName%3E
  %7B%0A    p
@@ -467,32 +467,131 @@
  = name;%0A    %7D%0A%0A
+    @Override%0A    public int compareTo(AttrName o) %7B%0A        return name.compareTo(o.name);%0A    %7D%0A%0A
     @Override%0A  

Make AttrName comparable.