Plane { @Override public int hashCode() { int result; long temp; result = this.normal.hashCode(); temp = Double.doubleToLongBits(this.distance); result = 31 * result + (int) (temp ^ (temp >>> 32)); return result; } Plane();  Plane(double x, double y, double z, double distance);  Plane(Plane plane); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); double distanceToPoint(Vec3 point); Plane set(double x, double y, double z, double distance); Plane set(Plane plane); Plane transformByMatrix(Matrix4 matrix); double dot(Vec3 vector); boolean intersectsSegment(Vec3 endPoint1, Vec3 endPoint2); int onSameSide(Vec3 pointA, Vec3 pointB); Vec3[] clip(Vec3 pointA, Vec3 pointB);  }
@Test public void testHashCode() throws Exception { Vec3 n = new Vec3(3, 4, 5).normalize(); double distance1 = 6; double distance2 = 7; Plane plane1 = new Plane(n.x, n.y, n.z, distance1); Plane plane2 = new Plane(n.x, n.y, n.z, distance1); Plane plane3 = new Plane(n.x, n.y, n.z, distance2); int hashCode1 = plane1.hashCode(); int hashCode2 = plane2.hashCode(); int hashCode3 = plane3.hashCode(); assertEquals(hashCode1, hashCode2); assertNotEquals(hashCode1, hashCode3); }