APIdia Launch Partner
Top Description Methods
javafx.beans.binding

public Interface NumberExpression

extends ObservableNumberValue
Known Direct Subinterfaces
javafx.beans.binding.NumberBinding
Known Direct Implementers
javafx.beans.binding.NumberExpressionBase
Imports
java.util.Locale, javafx.beans.value.ObservableNumberValue

NumberExpression is an javafx.beans.value.ObservableNumberValue plus additional convenience methods to generate bindings in a fluent style.

This API allows to mix types when defining arithmetic operations. The type of the result is defined by the same rules as in the Java Language.

  1. If one of the operands is a double, the result is a double.
  2. If not and one of the operands is a float, the result is a float.
  3. If not and one of the operands is a long, the result is a long.
  4. The result is an integer otherwise.

To be able to deal with an unspecified return type, two interfaces NumberExpression and its counterpart javafx.beans.binding.NumberBinding were introduced. That means if the return type is specified as NumberBinding, the method will either return a javafx.beans.binding.DoubleBinding, javafx.beans.binding.FloatBinding, javafx.beans.binding.LongBinding or javafx.beans.binding.IntegerBinding, depending on the types of the operands.

The API tries to do its best in determining the correct return type, e.g. combining a javafx.beans.value.ObservableNumberValue with a primitive double will always result in a javafx.beans.binding.DoubleBinding. In cases where the return type is not known by the API, it is the responsibility of the developer to call the correct getter (intValue() etc.). If the internal representation does not match the type of the getter, a standard cast is done.

Since
JavaFX 2.0

Method Summary

Modifier and TypeMethod and Description
public NumberBinding

Returns:

the new NumberBinding
add
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the sum of this NumberExpression and another javafx.beans.value.ObservableNumberValue.

public NumberBinding

Returns:

the new NumberBinding
add
(final double
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the sum of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
add
(final float
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the sum of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
add
(final long
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the sum of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
add
(final int
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the sum of this NumberExpression and a constant value.

public StringBinding

Returns:

the new StringBinding
asString
()

Creates a javafx.beans.binding.StringBinding that holds the value of the NumberExpression turned into a String.

public StringBinding

Returns:

the new StringBinding
asString
(String
the formatting String
format
)

Creates a javafx.beans.binding.StringBinding that holds the value of the NumberExpression turned into a String.

public StringBinding

Returns:

the new StringBinding
asString
(Locale
the Locale to be used
locale
,
String
the formatting String
format
)

Creates a javafx.beans.binding.StringBinding that holds the value of the NumberExpression turned into a String.

public NumberBinding

Returns:

the new NumberBinding
divide
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the division of this NumberExpression and another javafx.beans.value.ObservableNumberValue.

public NumberBinding

Returns:

the new NumberBinding
divide
(final double
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the division of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
divide
(final float
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the division of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
divide
(final long
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the division of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
divide
(final int
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the division of this NumberExpression and a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than another javafx.beans.value.ObservableNumberValue.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final double
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final float
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final long
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThan
(final int
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than or equal to another javafx.beans.value.ObservableNumberValue.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final double
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final float
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final long
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
greaterThanOrEqualTo
(final int
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableNumberValue are equal.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final ObservableNumberValue
the second ObservableNumberValue
other
,
double
the tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableNumberValue are equal (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final double
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final float
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final long
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final long
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final int
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isEqualTo
(final int
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableNumberValue are not equal.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final ObservableNumberValue
the second ObservableNumberValue
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this and another javafx.beans.value.ObservableNumberValue are not equal (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final double
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final float
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final long
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is not equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final long
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final int
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is not equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
isNotEqualTo
(final int
the constant value
other
,
double
the permitted tolerance
epsilon
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance).

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is lesser than another javafx.beans.value.ObservableNumberValue.

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final double
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is lesser than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final float
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is lesser than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final long
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is lesser than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThan
(final int
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is lesser than a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is less than or equal to another javafx.beans.value.ObservableNumberValue.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final double
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final float
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final long
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.

public BooleanBinding

Returns:

the new BooleanBinding
lessThanOrEqualTo
(final int
the constant value
other
)

Creates a new javafx.beans.binding.BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.

public NumberBinding

Returns:

the new NumberBinding
multiply
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the product of this NumberExpression and another javafx.beans.value.ObservableNumberValue.

public NumberBinding

Returns:

the new NumberBinding
multiply
(final double
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the product of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
multiply
(final float
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the product of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
multiply
(final long
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the product of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
multiply
(final int
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the product of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
negate
()

Creates a new javafx.beans.binding.NumberBinding that calculates the negation of NumberExpression.

public NumberBinding

Returns:

the new NumberBinding
subtract
(final ObservableNumberValue
the second ObservableNumberValue
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the difference of this NumberExpression and another javafx.beans.value.ObservableNumberValue.

public NumberBinding

Returns:

the new NumberBinding
subtract
(final double
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the difference of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
subtract
(final float
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the difference of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
subtract
(final long
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the difference of this NumberExpression and a constant value.

public NumberBinding

Returns:

the new NumberBinding
subtract
(final int
the constant value
other
)

Creates a new javafx.beans.binding.NumberBinding that calculates the difference of this NumberExpression and a constant value.

Inherited from javafx.beans.value.ObservableNumberValue:
doubleValuefloatValueintValuelongValue