Package javafx.beans.binding
Class BooleanExpression
java.lang.Object
javafx.beans.binding.BooleanExpression
- All Implemented Interfaces:
Observable
,ObservableBooleanValue
,ObservableValue<Boolean>
- Direct Known Subclasses:
BooleanBinding
,ReadOnlyBooleanProperty
A
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.
- Since:
- JavaFX 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionand
(ObservableBooleanValue other) Creates a newBooleanExpression
that performs the conditional AND-operation on thisBooleanExpression
and aObservableBooleanValue
.static BooleanExpression
Returns aBooleanExpression
that wraps aObservableBooleanValue
.static BooleanExpression
booleanExpression
(ObservableValue<Boolean> value) Returns aBooleanExpression
that wraps anObservableValue
.getValue()
Returns the current value of thisObservableValue
not()
Creates a newBooleanExpression
that calculates the negation of thisBooleanExpression
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javafx.beans.Observable
addListener, removeListener
Methods inherited from interface javafx.beans.value.ObservableBooleanValue
get
Methods inherited from interface javafx.beans.value.ObservableValue
addListener, removeListener
-
Constructor Details
-
BooleanExpression
public BooleanExpression()Sole constructor
-
-
Method Details
-
getValue
Description copied from interface:ObservableValue
Returns the current value of thisObservableValue
- Specified by:
getValue
in interfaceObservableValue<Boolean>
- Returns:
- The current value
-
booleanExpression
Returns aBooleanExpression
that wraps aObservableBooleanValue
. If theObservableBooleanValue
is already aBooleanExpression
, it will be returned. Otherwise a newBooleanBinding
is created that is bound to theObservableBooleanValue
.- Parameters:
value
- The sourceObservableBooleanValue
- Returns:
- A
BooleanExpression
that wraps theObservableBooleanValue
if necessary - Throws:
NullPointerException
- ifvalue
isnull
-
booleanExpression
Returns aBooleanExpression
that wraps anObservableValue
. If theObservableValue
is already aBooleanExpression
, it will be returned. Otherwise a newBooleanBinding
is created that is bound to theObservableValue
. Note: null values will be interpreted as "false".- Parameters:
value
- The sourceObservableValue
- Returns:
- A
BooleanExpression
that wraps theObservableValue
if necessary - Throws:
NullPointerException
- ifvalue
isnull
- Since:
- JavaFX 8.0
-
and
Creates a newBooleanExpression
that performs the conditional AND-operation on thisBooleanExpression
and aObservableBooleanValue
.- Parameters:
other
- the otherObservableBooleanValue
- Returns:
- the new
BooleanExpression
- Throws:
NullPointerException
- ifother
isnull
-
not
Creates a newBooleanExpression
that calculates the negation of thisBooleanExpression
.- Returns:
- the new
BooleanExpression
-