public abstract class BooleanExpression extends Object implements ObservableBooleanValue
BooleanExpression is a
ObservableBooleanValue plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of BooleanExpression has to implement the method
ObservableBooleanValue.get(), which provides the
actual value of this expression.
| Constructor and Description |
|---|
BooleanExpression()
Sole constructor
|
| Modifier and Type | Method and Description |
|---|---|
BooleanBinding |
and(ObservableBooleanValue other)
Creates a new
BooleanExpression that performs the conditional
AND-operation on this BooleanExpression and a
ObservableBooleanValue. |
ObjectExpression<Boolean> |
asObject()
Creates an
ObjectExpression that holds the value
of this BooleanExpression. |
StringBinding |
asString()
|
static BooleanExpression |
booleanExpression(ObservableBooleanValue value)
Returns a
BooleanExpression that wraps a
ObservableBooleanValue. |
static BooleanExpression |
booleanExpression(ObservableValue<Boolean> value)
Returns a
BooleanExpression that wraps an
ObservableValue. |
Boolean |
getValue()
Returns the current value of this
ObservableValue |
BooleanBinding |
isEqualTo(ObservableBooleanValue other)
Creates a new
BooleanExpression that holds true if this and
another ObservableBooleanValue are equal. |
BooleanBinding |
isNotEqualTo(ObservableBooleanValue other)
Creates a new
BooleanExpression that holds true if this and
another ObservableBooleanValue are equal. |
BooleanBinding |
not()
Creates a new
BooleanExpression that calculates the negation of
this BooleanExpression. |
BooleanBinding |
or(ObservableBooleanValue other)
Creates a new
BooleanExpression that performs the conditional
OR-operation on this BooleanExpression and a
ObservableBooleanValue. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetaddListener, removeListeneraddListener, removeListenerpublic Boolean getValue()
ObservableValueObservableValuegetValue in interface ObservableValue<Boolean>public static BooleanExpression booleanExpression(ObservableBooleanValue value)
BooleanExpression that wraps a
ObservableBooleanValue. If the
ObservableBooleanValue is already a BooleanExpression, it
will be returned. Otherwise a new
BooleanBinding is created that is bound to
the ObservableBooleanValue.value - The source ObservableBooleanValueBooleanExpression that wraps the
ObservableBooleanValue if necessaryNullPointerException - if value is nullpublic static BooleanExpression booleanExpression(ObservableValue<Boolean> value)
BooleanExpression that wraps an
ObservableValue. If the
ObservableValue is already a BooleanExpression, it
will be returned. Otherwise a new
BooleanBinding is created that is bound to
the ObservableValue.
Note: null values will be interpreted as "false".value - The source ObservableValueBooleanExpression that wraps the
ObservableValue if necessaryNullPointerException - if value is nullpublic BooleanBinding and(ObservableBooleanValue other)
BooleanExpression that performs the conditional
AND-operation on this BooleanExpression and a
ObservableBooleanValue.other - the other ObservableBooleanValueBooleanExpressionNullPointerException - if other is nullpublic BooleanBinding or(ObservableBooleanValue other)
BooleanExpression that performs the conditional
OR-operation on this BooleanExpression and a
ObservableBooleanValue.other - the other ObservableBooleanValueBooleanExpressionNullPointerException - if other is nullpublic BooleanBinding not()
BooleanExpression that calculates the negation of
this BooleanExpression.BooleanExpressionpublic BooleanBinding isEqualTo(ObservableBooleanValue other)
BooleanExpression that holds true if this and
another ObservableBooleanValue are equal.other - the other ObservableBooleanValueBooleanExpressionNullPointerException - if other is nullpublic BooleanBinding isNotEqualTo(ObservableBooleanValue other)
BooleanExpression that holds true if this and
another ObservableBooleanValue are equal.other - the other ObservableBooleanValueBooleanExpressionNullPointerException - if other is nullpublic StringBinding asString()
StringBinding that holds the value
of this BooleanExpression turned into a String. If the
value of this BooleanExpression changes, the value of the
StringBinding will be updated automatically.StringBindingpublic ObjectExpression<Boolean> asObject()
ObjectExpression that holds the value
of this BooleanExpression. If the
value of this BooleanExpression changes, the value of the
ObjectExpression will be updated automatically.ObjectExpressionCopyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.