/** * Compares the fields sunID, category, classificationId, and name for equality * * @param obj * @return * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } ScopDescription other = (ScopDescription) obj; if (category == null) { if (other.category != null) { return false; } } else if (!category.equals(other.category)) { return false; } if (classificationId == null) { if (other.classificationId != null) { return false; } } else if (!classificationId.equals(other.classificationId)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return sunID == other.sunID; }
/** * @return * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((category == null) ? 0 : category.hashCode()); result = prime * result + ((classificationId == null) ? 0 : classificationId.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + sunID; return result; }