Class StringExpression

java.lang.Object
javafx.beans.binding.StringExpression
All Implemented Interfaces:
Observable, ObservableObjectValue<String>, ObservableStringValue, ObservableValue<String>
Direct Known Subclasses:
ReadOnlyStringProperty, StringBinding, StringConstant

public abstract class StringExpression extends Object implements ObservableStringValue
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 Details

    • StringExpression

      public StringExpression()
  • Method Details

    • getValue

      public String getValue()
      Description copied from interface: ObservableValue
      Returns the current value of this ObservableValue
      Specified by:
      getValue in interface ObservableValue<String>
      Returns:
      The current value
    • getValueSafe

      public final String getValueSafe()
      Returns usually the value of this StringExpression. Only if the value is null an empty String is returned instead.
      Returns:
      the value of this StringExpression or the empty String