/** * Returns the hash code value for this {@code Identity}. Returns the same hash code for {@code * Identity}s that are equal to each other as required by the general contract of {@link * Object#hashCode}. * * @return the hash code value for this {@code Identity}. * @see Object#equals(Object) * @see Identity#equals(Object) */ @Override public int hashCode() { int hash = 0; if (name != null) { hash += name.hashCode(); } if (scope != null) { hash += scope.hashCode(); } return hash; }