Module javafx.base

Class ObjectExpression<T>

    • Constructor Detail

      • ObjectExpression

        public ObjectExpression()
    • Method Detail

      • objectExpression

        public static <T> ObjectExpression<T> objectExpression​(ObservableObjectValue<T> value)
        Returns an 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.
        Type Parameters:
        T - the type of the wrapped Object
        Parameters:
        value - The source ObservableObjectValue
        Returns:
        A ObjectExpression that wraps the ObservableObjectValue if necessary
        Throws:
        NullPointerException - if value is null
      • isEqualTo

        public BooleanBinding isEqualTo​(Object other)
        Creates a new BooleanExpression that holds true if this ObjectExpression is equal to a constant value.
        Parameters:
        other - the constant value
        Returns:
        the new BooleanExpression
      • isNotEqualTo

        public BooleanBinding isNotEqualTo​(Object other)
        Creates a new BooleanExpression that holds true if this ObjectExpression is not equal to a constant value.
        Parameters:
        other - the constant value
        Returns:
        the new BooleanExpression
      • isNull

        public BooleanBinding isNull()
        Creates a new BooleanBinding that holds true if this ObjectExpression is null.
        Returns:
        the new BooleanBinding
      • isNotNull

        public BooleanBinding isNotNull()
        Creates a new BooleanBinding that holds true if this ObjectExpression is not null.
        Returns:
        the new BooleanBinding
      • asString

        public StringBinding asString()
        Creates a 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.
        Returns:
        the new StringBinding
        Since:
        JavaFX 8.0
      • asString

        public StringBinding asString​(String format)
        Creates a 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.

        Parameters:
        format - the formatting String
        Returns:
        the new StringBinding
        Since:
        JavaFX 8.0
      • asString

        public StringBinding asString​(Locale locale,
                                      String format)
        Creates a 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.

        Parameters:
        locale - the Locale to be used
        format - the formatting String
        Returns:
        the new StringBinding
        Since:
        JavaFX 8.0