class Token implements Comparable<Token> {

    static final Token EMPTY = new Token("");
    static final Token MULTI = new Token("#");
    static final Token SINGLE = new Token("+");
    final String name;

    protected Token(String s) {
        name = s;
    }

    protected String name() {
        return name;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 29 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {<FILL_FUNCTION_BODY>}

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

    @Override
    public int compareTo(Token other) {
        if (name == null) {
            if (other.name == null) {
                return 0;
            }
            return 1;
        }
        if (other.name == null) {
            return -1;
        }
        return name.compareTo(other.name);
    }

    /**
     * Token which starts with $ is reserved
     * */
    public boolean isReserved() {
        return name.startsWith("$");
    }
}

        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Token other = (Token) obj;
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    
<no_super_class>