Package javafx.beans.binding
Class StringExpression
java.lang.Object
javafx.beans.binding.StringExpression
- All Implemented Interfaces:
Observable,ObservableObjectValue<String>,ObservableStringValue,ObservableValue<String>
- Direct Known Subclasses:
ReadOnlyStringProperty,StringBinding,StringConstant
A
StringExpression is a
ObservableStringValue plus additional convenience
methods to generate bindings in a fluent style.
A concrete sub-class of StringExpression has to implement the method
ObservableObjectValue.get(), which provides the
actual value of this expression.
Note: all implementation of BooleanBinding
returned by the comparisons in this class consider a String that is
null equal to an empty String.
- Since:
- JavaFX 2.0
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.beans.Observable
addListener, removeListenerMethods inherited from interface javafx.beans.value.ObservableObjectValue
getMethods inherited from interface javafx.beans.value.ObservableValue
addListener, removeListener
-
Constructor Details
-
StringExpression
public StringExpression()
-
-
Method Details
-
getValue
Description copied from interface:ObservableValueReturns the current value of thisObservableValue- Specified by:
getValuein interfaceObservableValue<String>- Returns:
- The current value
-
getValueSafe
Returns usually the value of thisStringExpression. Only if the value isnullan emptyStringis returned instead.- Returns:
- the value of this
StringExpressionor the emptyString
-
isEmpty
-
isNotEmpty
Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not empty.Note: If the value of this
StringExpressionisnull, it is considered to be empty.- Returns:
- the new
BooleanBinding - Since:
- JavaFX 8.0
-