Code example for UUID

Methods: equals

0
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
 
        Comment comment = (Comment) o;
 
        if (inReplyTo != null ? !inReplyTo.equals(comment.inReplyTo) : comment.inReplyTo != null)
            return false; 
        if (text != null ? !text.equals(comment.text) : comment.text != null)
            return false; 
 
        return true; 
    } 
 
    @Override 
    public int hashCode() { 
        int result = super.hashCode();
        result = 31 * result + (text != null ? text.hashCode() : 0);
        result = 31 * result + (inReplyTo != null ? inReplyTo.hashCode() : 0);
        return result;
    }