@Test public void testSymmetric() { assertTrue(d1.equals(d2) && d2.equals(d1)); }
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != EqualsDemo.class) return false; EqualsDemo other = (EqualsDemo)o; if (int1 != other.int1) return false; if (!obj1.equals(other.obj1)) return false; return true; }
EqualsDemo { @Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != EqualsDemo.class) return false; EqualsDemo other = (EqualsDemo)o; if (int1 != other.int1) return false; if (!obj1.equals(other.obj1)) return false; return true; } }
EqualsDemo { @Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != EqualsDemo.class) return false; EqualsDemo other = (EqualsDemo)o; if (int1 != other.int1) return false; if (!obj1.equals(other.obj1)) return false; return true; } EqualsDemo(int i, SomeClass o);  EqualsDemo(); }
EqualsDemo { @Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != EqualsDemo.class) return false; EqualsDemo other = (EqualsDemo)o; if (int1 != other.int1) return false; if (!obj1.equals(other.obj1)) return false; return true; } EqualsDemo(int i, SomeClass o);  EqualsDemo(); @Override boolean equals(Object o); @Override int hashCode(); }
EqualsDemo { @Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != EqualsDemo.class) return false; EqualsDemo other = (EqualsDemo)o; if (int1 != other.int1) return false; if (!obj1.equals(other.obj1)) return false; return true; } EqualsDemo(int i, SomeClass o);  EqualsDemo(); @Override boolean equals(Object o); @Override int hashCode();  }