- java.lang.Object
- 
- javafx.beans.binding.ObjectExpression<T>
 
- 
- All Implemented Interfaces:
- Observable,- ObservableObjectValue<T>,- ObservableValue<T>
 - Direct Known Subclasses:
- ObjectBinding,- ReadOnlyObjectProperty
 
 public abstract class ObjectExpression<T> extends Object implements ObservableObjectValue<T> ObjectExpressionis anObservableObjectValueplus additional convenience methods to generate bindings in a fluent style.A concrete sub-class of ObjectExpressionhas to implement the methodObservableObjectValue.get(), which provides the actual value of this expression.- Since:
- JavaFX 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description ObjectExpression()
 - 
Method SummaryModifier and Type Method Description StringBindingasString()StringBindingasString(String format)StringBindingasString(Locale locale, String format)TgetValue()Returns the current value of thisObservableValueBooleanBindingisEqualTo(Object other)Creates a newBooleanExpressionthat holdstrueif thisObjectExpressionis equal to a constant value.BooleanBindingisEqualTo(ObservableObjectValue<?> other)Creates a newBooleanExpressionthat holdstrueif this and anotherObservableObjectValueare equal.BooleanBindingisNotEqualTo(Object other)Creates a newBooleanExpressionthat holdstrueif thisObjectExpressionis not equal to a constant value.BooleanBindingisNotEqualTo(ObservableObjectValue<?> other)Creates a newBooleanExpressionthat holdstrueif this and anotherObservableObjectValueare not equal.BooleanBindingisNotNull()BooleanBindingisNull()static <T> ObjectExpression<T>objectExpression(ObservableObjectValue<T> value)Returns anObjectExpressionthat wraps anObservableObjectValue.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface javafx.beans.ObservableaddListener, removeListener
 - 
Methods inherited from interface javafx.beans.value.ObservableObjectValueget
 - 
Methods inherited from interface javafx.beans.value.ObservableValueaddListener, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getValuepublic T getValue() Description copied from interface:ObservableValueReturns the current value of thisObservableValue- Specified by:
- getValuein interface- ObservableValue<T>
- Returns:
- The current value
 
 - 
objectExpressionpublic static <T> ObjectExpression<T> objectExpression(ObservableObjectValue<T> value) Returns anObjectExpressionthat wraps anObservableObjectValue. If theObservableObjectValueis already anObjectExpression, it will be returned. Otherwise a newObjectBindingis created that is bound to theObservableObjectValue.- Type Parameters:
- T- the type of the wrapped- Object
- Parameters:
- value- The source- ObservableObjectValue
- Returns:
- A ObjectExpressionthat wraps theObservableObjectValueif necessary
- Throws:
- NullPointerException- if- valueis- null
 
 - 
isEqualTopublic BooleanBinding isEqualTo(ObservableObjectValue<?> other) Creates a newBooleanExpressionthat holdstrueif this and anotherObservableObjectValueare equal.- Parameters:
- other- the other- ObservableObjectValue
- Returns:
- the new BooleanExpression
- Throws:
- NullPointerException- if- otheris- null
 
 - 
isEqualTopublic BooleanBinding isEqualTo(Object other) Creates a newBooleanExpressionthat holdstrueif thisObjectExpressionis equal to a constant value.- Parameters:
- other- the constant value
- Returns:
- the new BooleanExpression
 
 - 
isNotEqualTopublic BooleanBinding isNotEqualTo(ObservableObjectValue<?> other) Creates a newBooleanExpressionthat holdstrueif this and anotherObservableObjectValueare not equal.- Parameters:
- other- the other- ObservableObjectValue
- Returns:
- the new BooleanExpression
- Throws:
- NullPointerException- if- otheris- null
 
 - 
isNotEqualTopublic BooleanBinding isNotEqualTo(Object other) Creates a newBooleanExpressionthat holdstrueif thisObjectExpressionis not equal to a constant value.- Parameters:
- other- the constant value
- Returns:
- the new BooleanExpression
 
 - 
isNullpublic BooleanBinding isNull() - Returns:
- the new BooleanBinding
 
 - 
isNotNullpublic BooleanBinding isNotNull() - Returns:
- the new BooleanBinding
 
 - 
asStringpublic StringBinding asString() Creates aStringBindingthat holds the value of thisObjectExpressionturned into aString. If the value of thisObjectExpressionchanges, the value of theStringBindingwill be updated automatically.- Returns:
- the new StringBinding
- Since:
- JavaFX 8.0
 
 - 
asStringpublic StringBinding asString(String format) Creates aStringBindingthat holds the value of theObjectExpressionturned into aString. If the value of thisObjectExpressionchanges, the value of theStringBindingwill be updated automatically.The result is formatted according to the formatting String. Seejava.util.Formatterfor formatting rules.- Parameters:
- format- the formatting- String
- Returns:
- the new StringBinding
- Since:
- JavaFX 8.0
 
 - 
asStringpublic StringBinding asString(Locale locale, String format) Creates aStringBindingthat holds the value of theNumberExpressionturned into aString. If the value of thisNumberExpressionchanges, the value of theStringBindingwill be updated automatically.The result is formatted according to the formatting Stringand the passed inLocale. Seejava.util.Formatterfor formatting rules. Seejava.util.Localefor details onLocale.- Parameters:
- locale- the Locale to be used
- format- the formatting- String
- Returns:
- the new StringBinding
- Since:
- JavaFX 8.0
 
 
- 
 
-