package net.dean.jraw.models;

import com.fasterxml.jackson.databind.JsonNode;
import net.dean.jraw.models.meta.JsonProperty;
import net.dean.jraw.models.meta.Model;

/**
 * The Thing class is the base class for most data structures returned by the Reddit API. Every Thing has an
 * ID and a fullname (referred to as an ID36 in the Reddit source code). To construct a fullname, simply prepend
 * {@code tX_}, where {@code X} is an integer. For a valid list of these prefixes, see
 * <a href="https://www.reddit.com/dev/api/oauth#fullnames">here</a>. However, this is not the same for all classes. The
 * {@link Account} class's fullname will return the username instead of {@code t2_<id>}.
 *
 * @author Matthew Dean
 */
@Model(kind = Model.Kind.ABSTRACT)
public abstract class Thing extends RedditObject {

    /** Instantiates a new Thing */
    public Thing(JsonNode dataNode) {
        super(dataNode);
    }

    /** Gets this Thing's unique identifier, e.g. "8xwlg" */
    @JsonProperty
    public String getId() {
        return data("id");
    }

    /** Gets this Thing's fullname, e.g. "t1_c3v7f8u" */
    @JsonProperty
    public String getFullName() {
        return data("name");
    }
}

@@ -1191,11 +1191,575 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public int hashCode() %7B%0A        return getId().hashCode();%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object otherObject) %7B%0A        if (this == otherObject) %7B%0A            return true;%0A        %7D%0A%0A        if (!(otherObject instanceof Thing)) %7B%0A            return false;%0A        %7D%0A%0A        // Now that we know that the object we are checking is a Thing, cast it as one.%0A        Thing thing = (Thing) otherObject;%0A%0A        // Compare the ID String values and use that as the return value%0A        return this.getId().equals(thing.getId());%0A    %7D
 %0A%7D%0A

Add hashCode() and equals() to Thing