Top Description Constructors Methods
javafx.beans.binding

public abstract Class ObjectExpression<T>

extends Object
implements ObservableObjectValue<T>
Class Inheritance
All Implemented Interfaces
javafx.beans.value.ObservableObjectValue, javafx.beans.value.ObservableValue, javafx.beans.Observable
Known Direct Subclasses
javafx.beans.property.ReadOnlyObjectProperty, javafx.beans.binding.ObjectBinding
Type Parameters
<T>
the type of expression value
Imports
com.sun.javafx.binding.StringFormatter, javafx.beans.value.ObservableObjectValue, javafx.collections.FXCollections, .ObservableList, java.util.Locale

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

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

Since
JavaFX 2.0

Constructor Summary

AccessConstructor and Description
public
ObjectExpression()

Creates a default ObjectExpression.

Method Summary

Modifier and TypeMethod and Description
public StringBinding

Returns:

the new StringBinding
asString
()

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

public StringBinding

Returns:

the new StringBinding
asString
(String
the formatting String
format
)

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

public StringBinding

Returns:

the new StringBinding
asString
(Locale
the Locale to be used
locale
,
String
the formatting String
format
)

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

public T
getValue()

Implements javafx.beans.value.ObservableValue.getValue.

Returns the current value of this ObservableValue

public BooleanBinding

Returns:

the new BooleanExpression
isEqualTo
(final ObservableObjectValue<?>
the other ObservableObjectValue
other
)

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

public BooleanBinding

Returns:

the new BooleanExpression
isEqualTo
(final Object
the constant value
other
)

Creates a new BooleanExpression that holds true if this ObjectExpression is equal to a constant value.

public BooleanBinding

Returns:

the new BooleanExpression
isNotEqualTo
(final ObservableObjectValue<?>
the other ObservableObjectValue
other
)

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

public BooleanBinding

Returns:

the new BooleanExpression
isNotEqualTo
(final Object
the constant value
other
)

Creates a new BooleanExpression that holds true if this ObjectExpression is not equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isNotNull
()

Creates a new BooleanBinding that holds true if this ObjectExpression is not null.

public BooleanBinding

Returns:

the new BooleanBinding
isNull
()

Creates a new BooleanBinding that holds true if this ObjectExpression is null.

public static <
the type of the wrapped Object
T
>
ObjectExpression<T>

Returns:

A ObjectExpression that wraps the ObservableObjectValue if necessary
objectExpression
(final ObservableObjectValue<T>
The source ObservableObjectValue
value
)

Returns an ObjectExpression that wraps an javafx.beans.value.ObservableObjectValue.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ObjectExpressionback to summary
public ObjectExpression()

Creates a default ObjectExpression.

Method Detail

asStringback to summary
public StringBinding asString()

Creates a javafx.beans.binding.StringBinding that holds the value of this ObjectExpression turned into a String. If the value of this ObjectExpression changes, the value of the StringBinding will be updated automatically.

Returns:StringBinding

the new StringBinding

Since
JavaFX 8.0
asStringback to summary
public StringBinding asString(String format)

Creates a javafx.beans.binding.StringBinding that holds the value of the ObjectExpression turned into a String. If the value of this ObjectExpression changes, the value of the StringBinding will be updated automatically.

The result is formatted according to the formatting String. See java.util.Formatter for formatting rules.

Parameters
format:String

the formatting String

Returns:StringBinding

the new StringBinding

Since
JavaFX 8.0
asStringback to summary
public StringBinding asString(Locale locale, String format)

Creates a javafx.beans.binding.StringBinding that holds the value of the NumberExpression turned into a String. If the value of this NumberExpression changes, the value of the StringBinding will be updated automatically.

The result is formatted according to the formatting String and the passed in Locale. See java.util.Formatter for formatting rules. See java.util.Locale for details on Locale.

Parameters
locale:Locale

the Locale to be used

format:String

the formatting String

Returns:StringBinding

the new StringBinding

Since
JavaFX 8.0
getValueback to summary
public T getValue()

Implements javafx.beans.value.ObservableValue.getValue.

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

Returns the current value of this ObservableValue

Returns:T

The current value

Annotations
@Override
isEqualToback to summary
public BooleanBinding isEqualTo(final ObservableObjectValue<?> other)

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

Parameters
other:ObservableObjectValue<?>

the other ObservableObjectValue

Returns:BooleanBinding

the new BooleanExpression

Exceptions
NullPointerException:
if other is null
isEqualToback to summary
public BooleanBinding isEqualTo(final Object other)

Creates a new BooleanExpression that holds true if this ObjectExpression is equal to a constant value.

Parameters
other:Object

the constant value

Returns:BooleanBinding

the new BooleanExpression

isNotEqualToback to summary
public BooleanBinding isNotEqualTo(final ObservableObjectValue<?> other)

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

Parameters
other:ObservableObjectValue<?>

the other ObservableObjectValue

Returns:BooleanBinding

the new BooleanExpression

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

Creates a new BooleanExpression that holds true if this ObjectExpression is not equal to a constant value.

Parameters
other:Object

the constant value

Returns:BooleanBinding

the new BooleanExpression

isNotNullback to summary
public BooleanBinding isNotNull()

Creates a new BooleanBinding that holds true if this ObjectExpression is not null.

Returns:BooleanBinding

the new BooleanBinding

isNullback to summary
public BooleanBinding isNull()

Creates a new BooleanBinding that holds true if this ObjectExpression is null.

Returns:BooleanBinding

the new BooleanBinding

objectExpressionback to summary
public static <T> ObjectExpression<T> objectExpression(final ObservableObjectValue<T> value)

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

Parameters
<T>
the type of the wrapped Object
value:ObservableObjectValue<T>

The source ObservableObjectValue

Returns:ObjectExpression<T>

A ObjectExpression that wraps the ObservableObjectValue if necessary

Exceptions
NullPointerException:
if value is null