package rms.model;

import java.io.Serializable;
import java.util.Objects;

/**
 *
 * @author Timothy
 */
public final class Tag implements Serializable, Comparable<Tag> {

    private static final long serialVersionUID = 01L;

    private final String name;

    /**
     * Creates a new Tag with the given name.
     *
     * NOTE: must use {@link State#newTag(java.lang.String)} to create a new
     * Tag.
     *
     * @param name
     */
    protected Tag(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }

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

    @Override
    public boolean equals(Object obj) {
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        return Objects.equals(this.name, ((Tag) obj).name);
    }

    @Override
    public int compareTo(Tag o) {
        return this.name.compareTo(o.name);
    }
}

@@ -331,14 +331,9 @@
 TE: 
-must u
+U
 se %7B
@@ -385,23 +385,16 @@
 te a new
-%0A     *
  Tag.%0A  
@@ -738,16 +738,21 @@
 null %7C%7C 
+this.
 getClass
@@ -810,25 +810,33 @@
        %7D
-%0A
+ else %7B%0A 
         
 return O
@@ -819,32 +819,35 @@
 else %7B%0A         
+   
 return Objects.e
@@ -874,32 +874,42 @@
 ag) obj).name);%0A
+        %7D%0A
     %7D%0A%0A    @Over

Refactor and update comments