Module javafx.base

Class NumberExpressionBase

java.lang.Object
javafx.beans.binding.NumberExpressionBase
All Implemented Interfaces:
NumberExpression, Observable, ObservableNumberValue, ObservableValue<Number>
Direct Known Subclasses:
DoubleExpression, FloatExpression, IntegerExpression, LongExpression

public abstract class NumberExpressionBase
extends Object
implements NumberExpression
NumberExpressionBase contains convenience methods to generate bindings in a fluent style, that are common to all NumberExpression subclasses.

NumberExpressionBase serves as a place for common code of specific NumberExpression subclasses for the specific number type.

Since:
JavaFX 2.0
See Also:
IntegerExpression, LongExpression, FloatExpression, DoubleExpression
  • Constructor Details

    • NumberExpressionBase

      public NumberExpressionBase()
      Creates a default NumberExpressionBase.
  • Method Details

    • numberExpression

      public static <S extends Number> NumberExpressionBase numberExpression​(ObservableNumberValue value)
      Returns an NumberExpressionBase that wraps a ObservableNumberValue. If the ObservableNumberValue is already an instance of NumberExpressionBase, it will be returned. Otherwise a new NumberBinding is created that is bound to the ObservableNumberValue.
      Type Parameters:
      S - The type of Number to be wrapped
      Parameters:
      value - The source ObservableNumberValue
      Returns:
      An NumberExpressionBase that wraps the ObservableNumberValue if necessary
      Throws:
      NullPointerException - if value is null