BooleanExpressions { public static ObservableBool not(@NotNull ObservableValue<Boolean> value) { return new NotExpression(value); }  static ObservableBool any(ObservableValue<Boolean>... values); static ObservableBool not(@NotNull ObservableValue<Boolean> value); static final ObservableBool TRUE; static final ObservableBool FALSE; }
@Test public void testNotExpression() throws Exception { BoolValueProperty srcValue = new BoolValueProperty(true); BoolValueProperty destValue = new BoolValueProperty(); BindingsManager bindings = new BindingsManager(BindingsManager.INVOKE_IMMEDIATELY_STRATEGY); bindings.bind(destValue, BooleanExpressions.not(srcValue)); assertThat(srcValue.get()).isTrue(); assertThat(destValue.get()).isFalse(); srcValue.set(false); assertThat(srcValue.get()).isFalse(); assertThat(destValue.get()).isTrue(); }