public abstract class ObjectExpression<T> extends Object implements ObservableObjectValue<T>
ObjectExpression is a
ObservableObjectValue plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of ObjectExpression has to implement the method
ObservableObjectValue.get(), which provides the
actual value of this expression.
| Constructor and Description |
|---|
ObjectExpression() |
| Modifier and Type | Method and Description |
|---|---|
StringBinding |
asString()
|
StringBinding |
asString(Locale locale,
String format)
|
StringBinding |
asString(String format)
|
T |
getValue()
Returns the current value of this
ObservableValue |
BooleanBinding |
isEqualTo(Object other)
Creates a new
BooleanExpression that holds true if this
ObjectExpression is equal to a constant value. |
BooleanBinding |
isEqualTo(ObservableObjectValue<?> other)
Creates a new
BooleanExpression that holds true if this and
another ObservableObjectValue are equal. |
BooleanBinding |
isNotEqualTo(Object other)
Creates a new
BooleanExpression that holds true if this
ObjectExpression is not equal to a constant value. |
BooleanBinding |
isNotEqualTo(ObservableObjectValue<?> other)
Creates a new
BooleanExpression that holds true if this and
another ObservableObjectValue are not equal. |
BooleanBinding |
isNotNull()
|
BooleanBinding |
isNull()
|
static <T> ObjectExpression<T> |
objectExpression(ObservableObjectValue<T> value)
Returns an
ObjectExpression that wraps an
ObservableObjectValue. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetaddListener, removeListeneraddListener, removeListenerpublic T getValue()
ObservableValueObservableValuegetValue in interface ObservableValue<T>public static <T> ObjectExpression<T> objectExpression(ObservableObjectValue<T> value)
ObjectExpression that wraps an
ObservableObjectValue. If the
ObservableObjectValue is already an ObjectExpression, it
will be returned. Otherwise a new
ObjectBinding is created that is bound to
the ObservableObjectValue.value - The source ObservableObjectValueObjectExpression that wraps the
ObservableObjectValue if necessaryNullPointerException - if value is nullpublic BooleanBinding isEqualTo(ObservableObjectValue<?> other)
BooleanExpression that holds true if this and
another ObservableObjectValue are equal.other - the other ObservableObjectValueBooleanExpressionNullPointerException - if other is nullpublic BooleanBinding isEqualTo(Object other)
BooleanExpression that holds true if this
ObjectExpression is equal to a constant value.other - the constant valueBooleanExpressionpublic BooleanBinding isNotEqualTo(ObservableObjectValue<?> other)
BooleanExpression that holds true if this and
another ObservableObjectValue are not equal.other - the other ObservableObjectValueBooleanExpressionNullPointerException - if other is nullpublic BooleanBinding isNotEqualTo(Object other)
BooleanExpression that holds true if this
ObjectExpression is not equal to a constant value.other - the constant valueBooleanExpressionpublic BooleanBinding isNull()
BooleanBindingpublic BooleanBinding isNotNull()
BooleanBindingpublic 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.StringBindingpublic StringBinding asString(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 StringStringBindingpublic StringBinding asString(Locale locale, 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.
format - the formatting StringStringBindingCopyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.