public abstract class ObjectExpression<T>
extends java.lang.Object
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.
Constructor and Description |
---|
ObjectExpression() |
Modifier and Type | Method and Description |
---|---|
StringBinding |
asString()
|
StringBinding |
asString(java.util.Locale locale,
java.lang.String format)
|
StringBinding |
asString(java.lang.String format)
|
T |
getValue() |
BooleanBinding |
isEqualTo(<any> other)
Creates a new
BooleanExpression that holds true if this and
another javafx.beans.value.ObservableObjectValue are equal. |
BooleanBinding |
isNotEqualTo(<any> other)
Creates a new
BooleanExpression that holds true if this and
another javafx.beans.value.ObservableObjectValue are not equal. |
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
static <T> ObjectExpression<T> |
objectExpression(<any> value)
Returns an
ObjectExpression that wraps an
javafx.beans.value.ObservableObjectValue . |
public T getValue()
public static <T> ObjectExpression<T> objectExpression(<any> value)
ObjectExpression
that wraps an
javafx.beans.value.ObservableObjectValue
. If the
ObservableObjectValue
is already an ObjectExpression
, it
will be returned. Otherwise a new
ObjectBinding
is created that is bound to
the ObservableObjectValue
.T
- the type of the wrapped Object
value
- The source ObservableObjectValue
ObjectExpression
that wraps the
ObservableObjectValue
if necessaryjava.lang.NullPointerException
- if value
is null
public BooleanBinding isEqualTo(<any> other)
BooleanExpression
that holds true
if this and
another javafx.beans.value.ObservableObjectValue
are equal.other
- the other ObservableObjectValue
BooleanExpression
java.lang.NullPointerException
- if other
is null
public BooleanBinding isNotEqualTo(<any> other)
BooleanExpression
that holds true
if this and
another javafx.beans.value.ObservableObjectValue
are not equal.other
- the other ObservableObjectValue
BooleanExpression
java.lang.NullPointerException
- if other
is null
public BooleanBinding isNull()
BooleanBinding
public BooleanBinding isNotNull()
BooleanBinding
public StringBinding asString()
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.StringBinding
public StringBinding asString(java.lang.String format)
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.
format
- the formatting String
StringBinding
public StringBinding asString(java.util.Locale locale, java.lang.String format)
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
.
locale
- the Locale to be usedformat
- the formatting String
StringBinding