@Test public void testEquals() { Constraint myconstraint1 = createMock(Constraint.class); Constraint myconstraint2 = createMock(Constraint.class); Constraint myconstraint3 = createMock(Constraint.class); Constraint myconstraint4 = createMock(Constraint.class); And myand1 = new And(myconstraint1, myconstraint2); And myand2 = new And(myconstraint4, myconstraint3); Assert.assertFalse(myand1.equals(null)); Assert.assertFalse(myand1.equals(myand2)); Assert.assertTrue(myand1.equals(myand1)); }
@Override public boolean equals(Object a) { if (!(a instanceof And)) { return false; } return super.equals(a); }
And extends Logic { @Override public boolean equals(Object a) { if (!(a instanceof And)) { return false; } return super.equals(a); } }
And extends Logic { @Override public boolean equals(Object a) { if (!(a instanceof And)) { return false; } return super.equals(a); } And();  And(Constraint... subConstraints);  And(List<Constraint> subConstraints); }
And extends Logic { @Override public boolean equals(Object a) { if (!(a instanceof And)) { return false; } return super.equals(a); } And();  And(Constraint... subConstraints);  And(List<Constraint> subConstraints); @Override String toString(); @Override boolean equals(Object a); @Override int hashCode(); }
And extends Logic { @Override public boolean equals(Object a) { if (!(a instanceof And)) { return false; } return super.equals(a); } And();  And(Constraint... subConstraints);  And(List<Constraint> subConstraints); @Override String toString(); @Override boolean equals(Object a); @Override int hashCode();  }