@Test public void testOr() { IntegerProperty i = integerProperty("i", 1); assertThat(or(0, 1).evaluate(i), is(true)); assertThat(or(2, 3).evaluate(i), is(false)); }
public static <P> WhenCondition<P> or(final P... values) { return new WhenCondition<P>() { public boolean evaluate(P currentValue) { for (P value : values) { if (eq(currentValue, value)) { return true; } } return false; } }; }
WhenConditions { public static <P> WhenCondition<P> or(final P... values) { return new WhenCondition<P>() { public boolean evaluate(P currentValue) { for (P value : values) { if (eq(currentValue, value)) { return true; } } return false; } }; } }
WhenConditions { public static <P> WhenCondition<P> or(final P... values) { return new WhenCondition<P>() { public boolean evaluate(P currentValue) { for (P value : values) { if (eq(currentValue, value)) { return true; } } return false; } }; }  }
WhenConditions { public static <P> WhenCondition<P> or(final P... values) { return new WhenCondition<P>() { public boolean evaluate(P currentValue) { for (P value : values) { if (eq(currentValue, value)) { return true; } } return false; } }; }  static WhenCondition<Object> notNull(); static WhenCondition<Object> nullValue(); static WhenCondition<Integer> greaterThan(final Integer number); static WhenCondition<Integer> lessThan(final Integer number); static WhenCondition<P> or(final P... values); }
WhenConditions { public static <P> WhenCondition<P> or(final P... values) { return new WhenCondition<P>() { public boolean evaluate(P currentValue) { for (P value : values) { if (eq(currentValue, value)) { return true; } } return false; } }; }  static WhenCondition<Object> notNull(); static WhenCondition<Object> nullValue(); static WhenCondition<Integer> greaterThan(final Integer number); static WhenCondition<Integer> lessThan(final Integer number); static WhenCondition<P> or(final P... values);  }