Top Description Constructors Methods
javafx.beans.binding

public abstract Class BooleanExpression

extends Object
implements ObservableBooleanValue
Class Inheritance
All Implemented Interfaces
javafx.beans.value.ObservableBooleanValue, javafx.beans.value.ObservableValue, javafx.beans.Observable
Known Direct Subclasses
javafx.beans.property.ReadOnlyBooleanProperty, javafx.beans.binding.BooleanBinding
Imports
javafx.beans.value.ObservableBooleanValue, .ObservableValue, javafx.collections.FXCollections, .ObservableList, com.sun.javafx.binding.StringFormatter

BooleanExpression is an javafx.beans.value.ObservableBooleanValue plus additional convenience methods to generate bindings in a fluent style.

A concrete sub-class of BooleanExpression has to implement the method javafx.beans.value.ObservableBooleanValue#get(), which provides the actual value of this expression.

Since
JavaFX 2.0

Constructor Summary

AccessConstructor and Description
public
BooleanExpression()

Creates a default BooleanExpression.

Method Summary

Modifier and TypeMethod and Description
public BooleanBinding

Returns:

the new BooleanExpression
and
(final ObservableBooleanValue
the other ObservableBooleanValue
other
)

Creates a new BooleanExpression that performs the conditional AND-operation on this BooleanExpression and a ObservableBooleanValue.

public ObjectExpression<Boolean>

Returns:

the new ObjectExpression
asObject
()

Creates an javafx.beans.binding.ObjectExpression that holds the value of this BooleanExpression.

public StringBinding

Returns:

the new StringBinding
asString
()

Creates a javafx.beans.binding.StringBinding that holds the value of this BooleanExpression turned into a String.

public static BooleanExpression

Returns:

A BooleanExpression that wraps the ObservableBooleanValue if necessary
booleanExpression
(final ObservableBooleanValue
The source ObservableBooleanValue
value
)

Returns a BooleanExpression that wraps a javafx.beans.value.ObservableBooleanValue.

public static BooleanExpression

Returns:

A BooleanExpression that wraps the ObservableValue if necessary
booleanExpression
(final ObservableValue<Boolean>
The source ObservableValue
value
)

Returns a BooleanExpression that wraps an javafx.beans.value.ObservableValue.

public Boolean
getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

public BooleanBinding

Returns:

the new BooleanExpression
isEqualTo
(final ObservableBooleanValue
the other ObservableBooleanValue
other
)

Creates a new BooleanExpression that holds true if this and another javafx.beans.value.ObservableBooleanValue are equal.

public BooleanBinding

Returns:

the new BooleanExpression
isNotEqualTo
(final ObservableBooleanValue
the other ObservableBooleanValue
other
)

Creates a new BooleanExpression that holds true if this and another javafx.beans.value.ObservableBooleanValue are equal.

public BooleanBinding

Returns:

the new BooleanExpression
not
()

Creates a new BooleanExpression that calculates the negation of this BooleanExpression.

public BooleanBinding

Returns:

the new BooleanExpression
or
(final ObservableBooleanValue
the other ObservableBooleanValue
other
)

Creates a new BooleanExpression that performs the conditional OR-operation on this BooleanExpression and a ObservableBooleanValue.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BooleanExpressionback to summary
public BooleanExpression()

Creates a default BooleanExpression.

Method Detail

andback to summary
public BooleanBinding and(final ObservableBooleanValue other)

Creates a new BooleanExpression that performs the conditional AND-operation on this BooleanExpression and a ObservableBooleanValue.

Parameters
other:ObservableBooleanValue

the other ObservableBooleanValue

Returns:BooleanBinding

the new BooleanExpression

Exceptions
NullPointerException:
if other is null
asObjectback to summary
public ObjectExpression<Boolean> asObject()

Creates an javafx.beans.binding.ObjectExpression that holds the value of this BooleanExpression. If the value of this BooleanExpression changes, the value of the ObjectExpression will be updated automatically.

Returns:ObjectExpression<Boolean>

the new ObjectExpression

Since
JavaFX 8.0
asStringback to summary
public StringBinding asString()

Creates a javafx.beans.binding.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.

Returns:StringBinding

the new StringBinding

booleanExpressionback to summary
public static BooleanExpression booleanExpression(final ObservableBooleanValue value)

Returns a BooleanExpression that wraps a javafx.beans.value.ObservableBooleanValue. If the ObservableBooleanValue is already a BooleanExpression, it will be returned. Otherwise a new javafx.beans.binding.BooleanBinding is created that is bound to the ObservableBooleanValue.

Parameters
value:ObservableBooleanValue

The source ObservableBooleanValue

Returns:BooleanExpression

A BooleanExpression that wraps the ObservableBooleanValue if necessary

Exceptions
NullPointerException:
if value is null
booleanExpressionback to summary
public static BooleanExpression booleanExpression(final ObservableValue<Boolean> value)

Returns a BooleanExpression that wraps an javafx.beans.value.ObservableValue. If the ObservableValue is already a BooleanExpression, it will be returned. Otherwise a new javafx.beans.binding.BooleanBinding is created that is bound to the ObservableValue.

Note

null values will be interpreted as "false".

Parameters
value:ObservableValue<Boolean>

The source ObservableValue

Returns:BooleanExpression

A BooleanExpression that wraps the ObservableValue if necessary

Exceptions
NullPointerException:
if value is null
Since
JavaFX 8.0
getValueback to summary
public Boolean getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Doc from javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

Returns:Boolean

The current value

Annotations
@Override
isEqualToback to summary
public BooleanBinding isEqualTo(final ObservableBooleanValue other)

Creates a new BooleanExpression that holds true if this and another javafx.beans.value.ObservableBooleanValue are equal.

Parameters
other:ObservableBooleanValue

the other ObservableBooleanValue

Returns:BooleanBinding

the new BooleanExpression

Exceptions
NullPointerException:
if other is null
isNotEqualToback to summary
public BooleanBinding isNotEqualTo(final ObservableBooleanValue other)

Creates a new BooleanExpression that holds true if this and another javafx.beans.value.ObservableBooleanValue are equal.

Parameters
other:ObservableBooleanValue

the other ObservableBooleanValue

Returns:BooleanBinding

the new BooleanExpression

Exceptions
NullPointerException:
if other is null
notback to summary
public BooleanBinding not()

Creates a new BooleanExpression that calculates the negation of this BooleanExpression.

Returns:BooleanBinding

the new BooleanExpression

orback to summary
public BooleanBinding or(final ObservableBooleanValue other)

Creates a new BooleanExpression that performs the conditional OR-operation on this BooleanExpression and a ObservableBooleanValue.

Parameters
other:ObservableBooleanValue

the other ObservableBooleanValue

Returns:BooleanBinding

the new BooleanExpression

Exceptions
NullPointerException:
if other is null