/** * Tests this object for equality with another. * * @param obj the object ({@code null} permitted). * * @return {@code true} or {@code false}. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryTextAnnotation)) { return false; } CategoryTextAnnotation that = (CategoryTextAnnotation) obj; if (!super.equals(obj)) { return false; } if (!this.category.equals(that.getCategory())) { return false; } if (!this.categoryAnchor.equals(that.getCategoryAnchor())) { return false; } if (this.value != that.getValue()) { return false; } return true; }
/** * Tests this object for equality with another. * * @param obj the object (<code>null</code> permitted). * * @return <code>true</code> or <code>false</code>. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryTextAnnotation)) { return false; } CategoryTextAnnotation that = (CategoryTextAnnotation) obj; if (!super.equals(obj)) { return false; } if (!this.category.equals(that.getCategory())) { return false; } if (!this.categoryAnchor.equals(that.getCategoryAnchor())) { return false; } if (this.value != that.getValue()) { return false; } return true; }