/** * Returns a hash value for this envelope. This value need not remain consistent between * different implementations of the same class. */ @Override public int hashCode() { // Algorithm from Effective Java by Joshua Bloch [Jon Aquino] int result = super.hashCode(); result = 37 * result + Coordinate.hashCode(minz); result = 37 * result + Coordinate.hashCode(maxz); int code = result ^ (int) serialVersionUID; if (crs != null) { code ^= crs.hashCode(); } return code; }
public int hashCode() { //Algorithm from Effective Java by Joshua Bloch [Jon Aquino] int result = 17; result = 37 * result + Coordinate.hashCode(minx); result = 37 * result + Coordinate.hashCode(maxx); result = 37 * result + Coordinate.hashCode(miny); result = 37 * result + Coordinate.hashCode(maxy); return result; }
@Override public int hashCode() { int result; long temp; result = center.hashCode(); temp = radius != +0.0d ? Double.doubleToLongBits( radius ) : 0L; result = 31 * result + (int) ( temp ^ ( temp >>> 32 ) ); return result; }