@Test(dataProvider = "input") public void testTruthTable(Proposition a, Proposition b, Boolean r) { Or p = new Or(a, b); Assert.assertEquals(p.eval(new Context()), r); }
@Override public Boolean eval(Context m) { Boolean r1 = p1.eval(m); if (r1 == null) { return null; } if (r1) { return true; } return p2.eval(m); }
Or extends BinaryProp { @Override public Boolean eval(Context m) { Boolean r1 = p1.eval(m); if (r1 == null) { return null; } if (r1) { return true; } return p2.eval(m); } }
Or extends BinaryProp { @Override public Boolean eval(Context m) { Boolean r1 = p1.eval(m); if (r1 == null) { return null; } if (r1) { return true; } return p2.eval(m); } Or(Proposition p1, Proposition p2); }
Or extends BinaryProp { @Override public Boolean eval(Context m) { Boolean r1 = p1.eval(m); if (r1 == null) { return null; } if (r1) { return true; } return p2.eval(m); } Or(Proposition p1, Proposition p2); @Override String operator(); @Override And not(); @Override Boolean eval(Context m); @Override String toString(); }
Or extends BinaryProp { @Override public Boolean eval(Context m) { Boolean r1 = p1.eval(m); if (r1 == null) { return null; } if (r1) { return true; } return p2.eval(m); } Or(Proposition p1, Proposition p2); @Override String operator(); @Override And not(); @Override Boolean eval(Context m); @Override String toString();  }