@Test
  public void test() {
    @SuppressWarnings("unchecked")
    final Condition<Double> c1 = ops.op(ComparableGreaterThan.class, Double.class, 3.0);
    @SuppressWarnings("unchecked")
    final Condition<Double> c2 = ops.op(ComparableLessThan.class, Double.class, 6.0);

    final BoolType result = ops.logic().xor(5.0, c1, c2);
    assertFalse(result.get());

    final BoolType result2 = ops.logic().xor(2.0, c1, c2);
    assertTrue(result2.get());

    final BoolType result3 = ops.logic().xor(7.0, c1, c2);
    assertTrue(result3.get());

    final BoolType result4 = ops.logic().xor(Double.NaN, c1, c2);
    assertTrue(result4.get());
  }
Beispiel #2
0
 @Override
 public boolean valueEquals(BoolType t) {
   return get() == t.get();
 }
Beispiel #3
0
 @Override
 public void set(final BoolType c) {
   value = c.get();
 }
 @Override
 public BoolType get() {
   type.set(contains.contains(this));
   return type;
 }