BooleanExpressions { public static ObservableBool not(@NotNull ObservableValue<Boolean> value) { return new NotExpression(value); }  static ObservableBool any(ObservableValue<Boolean>... values); static ObservableBool any(Collection<? extends ObservableValue<Boolean>> values); static ObservableBool not(@NotNull ObservableValue<Boolean> value);  }
@Test public void testNotExpression() throws Exception { BoolValueProperty srcValue = new BoolValueProperty(true); BoolValueProperty destValue = new BoolValueProperty(); BindingsManager bindings = new BindingsManager(BatchInvoker.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(); }