Interface NumberExpression
- All Superinterfaces:
-
Observable,ObservableNumberValue,ObservableValue<Number>
- All Known Subinterfaces:
NumberBinding
- All Known Implementing Classes:
-
DoubleBinding,DoubleExpression,DoubleProperty,DoublePropertyBase,FloatBinding,FloatExpression,FloatProperty,FloatPropertyBase,IntegerBinding,IntegerExpression,IntegerProperty,IntegerPropertyBase,JavaBeanDoubleProperty,JavaBeanFloatProperty,JavaBeanIntegerProperty,JavaBeanLongProperty,LongBinding,LongExpression,LongProperty,LongPropertyBase,NumberExpressionBase,ReadOnlyDoubleProperty,ReadOnlyDoublePropertyBase,ReadOnlyDoubleWrapper,ReadOnlyFloatProperty,ReadOnlyFloatPropertyBase,ReadOnlyFloatWrapper,ReadOnlyIntegerProperty,ReadOnlyIntegerPropertyBase,ReadOnlyIntegerWrapper,ReadOnlyJavaBeanDoubleProperty,ReadOnlyJavaBeanFloatProperty,ReadOnlyJavaBeanIntegerProperty,ReadOnlyJavaBeanLongProperty,ReadOnlyLongProperty,ReadOnlyLongPropertyBase,ReadOnlyLongWrapper,SimpleDoubleProperty,SimpleFloatProperty,SimpleIntegerProperty,SimpleLongProperty,SimpleStyleableDoubleProperty,SimpleStyleableFloatProperty,SimpleStyleableIntegerProperty,SimpleStyleableLongProperty,StyleableDoubleProperty,StyleableFloatProperty,StyleableIntegerProperty,StyleableLongProperty
public interface NumberExpression extends ObservableNumberValue
NumberExpression is an 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.
- If one of the operands is a double, the result is a double.
- If not and one of the operands is a float, the result is a float.
- If not and one of the operands is a long, the result is a long.
- The result is an integer otherwise.
To be able to deal with an unspecified return type, two interfaces NumberExpression and its counterpart NumberBinding were introduced. That means if the return type is specified as NumberBinding, the method will either return a DoubleBinding, FloatBinding, LongBinding or 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 ObservableNumberValue with a primitive double will always result in a 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 (ObservableNumberValue.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 Type | Method | Description |
|---|---|---|
NumberBinding |
add |
Creates a new NumberBinding that calculates the sum of this NumberExpression and a constant value. |
NumberBinding |
add |
Creates a new NumberBinding that calculates the sum of this NumberExpression and a constant value. |
NumberBinding |
add |
Creates a new NumberBinding that calculates the sum of this NumberExpression and a constant value. |
NumberBinding |
add |
Creates a new NumberBinding that calculates the sum of this NumberExpression and a constant value. |
NumberBinding |
add |
Creates a new NumberBinding that calculates the sum of this NumberExpression and another ObservableNumberValue. |
StringBinding |
asString() |
|
StringBinding |
asString |
|
StringBinding |
asString |
|
NumberBinding |
divide |
Creates a new NumberBinding that calculates the division of this NumberExpression and a constant value. |
NumberBinding |
divide |
Creates a new NumberBinding that calculates the division of this NumberExpression and a constant value. |
NumberBinding |
divide |
Creates a new NumberBinding that calculates the division of this NumberExpression and a constant value. |
NumberBinding |
divide |
Creates a new NumberBinding that calculates the division of this NumberExpression and a constant value. |
NumberBinding |
divide |
Creates a new NumberBinding that calculates the division of this NumberExpression and another ObservableNumberValue. |
BooleanBinding |
greaterThan |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than another ObservableNumberValue. |
BooleanBinding |
greaterThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value. |
BooleanBinding |
greaterThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value. |
BooleanBinding |
greaterThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value. |
BooleanBinding |
greaterThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value. |
BooleanBinding |
greaterThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is greater than or equal to another ObservableNumberValue. |
BooleanBinding |
isEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). |
BooleanBinding |
isEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). |
BooleanBinding |
isEqualTo |
|
BooleanBinding |
isEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). |
BooleanBinding |
isEqualTo |
|
BooleanBinding |
isEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). |
BooleanBinding |
isEqualTo |
|
BooleanBinding |
isEqualTo |
Creates a new BooleanBinding that holds true if this and another ObservableNumberValue are equal (with a tolerance). |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is not equal to a constant value. |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is not equal to a constant value. |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this and another ObservableNumberValue are not equal. |
BooleanBinding |
isNotEqualTo |
Creates a new BooleanBinding that holds true if this and another ObservableNumberValue are not equal (with a tolerance). |
BooleanBinding |
lessThan |
Creates a new BooleanBinding that holds true if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan |
Creates a new BooleanBinding that holds true if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan |
Creates a new BooleanBinding that holds true if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan |
Creates a new BooleanBinding that holds true if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan |
Creates a new BooleanBinding that holds true if this NumberExpression is lesser than another ObservableNumberValue. |
BooleanBinding |
lessThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value. |
BooleanBinding |
lessThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value. |
BooleanBinding |
lessThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value. |
BooleanBinding |
lessThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value. |
BooleanBinding |
lessThanOrEqualTo |
Creates a new BooleanBinding that holds true if this NumberExpression is less than or equal to another ObservableNumberValue. |
NumberBinding |
multiply |
Creates a new NumberBinding that calculates the product of this NumberExpression and a constant value. |
NumberBinding |
multiply |
Creates a new NumberBinding that calculates the product of this NumberExpression and a constant value. |
NumberBinding |
multiply |
Creates a new NumberBinding that calculates the product of this NumberExpression and a constant value. |
NumberBinding |
multiply |
Creates a new NumberBinding that calculates the product of this NumberExpression and a constant value. |
NumberBinding |
multiply |
Creates a new NumberBinding that calculates the product of this NumberExpression and another ObservableNumberValue. |
NumberBinding |
negate() |
Creates a new NumberBinding that calculates the negation of NumberExpression. |
NumberBinding |
subtract |
Creates a new NumberBinding that calculates the difference of this NumberExpression and a constant value. |
NumberBinding |
subtract |
Creates a new NumberBinding that calculates the difference of this NumberExpression and a constant value. |
NumberBinding |
subtract |
Creates a new NumberBinding that calculates the difference of this NumberExpression and a constant value. |
NumberBinding |
subtract |
Creates a new NumberBinding that calculates the difference of this NumberExpression and a constant value. |
NumberBinding |
subtract |
Creates a new NumberBinding that calculates the difference of this NumberExpression and another ObservableNumberValue. |
Methods declared in interface javafx.beans.Observable
addListener, removeListener, subscribe
Methods declared in interface javafx.beans.value.ObservableNumberValue
doubleValue, floatValue, intValue, longValue
Methods declared in interface javafx.beans.value.ObservableValue
addListener, flatMap, getValue, map, orElse, removeListener, subscribe, subscribe, when
Method Details
negate
NumberBinding negate()
NumberBinding that calculates the negation of NumberExpression.- Returns:
- the new
NumberBinding
add
NumberBinding add(ObservableNumberValue other)
NumberBinding that calculates the sum of this NumberExpression and another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
NumberBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
add
NumberBinding add(double other)
NumberBinding that calculates the sum of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
add
NumberBinding add(float other)
NumberBinding that calculates the sum of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
add
NumberBinding add(long other)
NumberBinding that calculates the sum of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
add
NumberBinding add(int other)
NumberBinding that calculates the sum of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
subtract
NumberBinding subtract(ObservableNumberValue other)
NumberBinding that calculates the difference of this NumberExpression and another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
NumberBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
subtract
NumberBinding subtract(double other)
NumberBinding that calculates the difference of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
subtract
NumberBinding subtract(float other)
NumberBinding that calculates the difference of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
subtract
NumberBinding subtract(long other)
NumberBinding that calculates the difference of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
subtract
NumberBinding subtract(int other)
NumberBinding that calculates the difference of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
multiply
NumberBinding multiply(ObservableNumberValue other)
NumberBinding that calculates the product of this NumberExpression and another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
NumberBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
multiply
NumberBinding multiply(double other)
NumberBinding that calculates the product of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
multiply
NumberBinding multiply(float other)
NumberBinding that calculates the product of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
multiply
NumberBinding multiply(long other)
NumberBinding that calculates the product of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
multiply
NumberBinding multiply(int other)
NumberBinding that calculates the product of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
divide
NumberBinding divide(ObservableNumberValue other)
NumberBinding that calculates the division of this NumberExpression and another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
NumberBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
divide
NumberBinding divide(double other)
NumberBinding that calculates the division of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
divide
NumberBinding divide(float other)
NumberBinding that calculates the division of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
divide
NumberBinding divide(long other)
NumberBinding that calculates the division of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
divide
NumberBinding divide(int other)
NumberBinding that calculates the division of this NumberExpression and a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
NumberBinding
isEqualTo
BooleanBinding isEqualTo(ObservableNumberValue other)
BooleanBinding that holds true if this and another ObservableNumberValue are equal. When comparing floating-point numbers it is recommended to use the isEqualTo() method that allows a small tolerance.
- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
isEqualTo
BooleanBinding isEqualTo(ObservableNumberValue other, double epsilon)
BooleanBinding that holds true if this and another ObservableNumberValue are equal (with a tolerance). Two operands a and b are considered equal if Math.abs(a-b) <= epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers because of rounding-errors.
- Parameters:
-
other- the secondObservableNumberValue -
epsilon- the tolerance - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
isEqualTo
BooleanBinding isEqualTo(double other, double epsilon)
BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). Two operands a and b are considered equal if Math.abs(a-b) <= epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers because of rounding-errors.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isEqualTo
BooleanBinding isEqualTo(float other, double epsilon)
BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). Two operands a and b are considered equal if Math.abs(a-b) <= epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers because of rounding-errors.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isEqualTo
BooleanBinding isEqualTo(long other)
BooleanBinding that holds true if this NumberExpression is equal to a constant value. When comparing floating-point numbers it is recommended to use the isEqualTo() method that allows a small tolerance.
- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
isEqualTo
BooleanBinding isEqualTo(long other, double epsilon)
BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). Two operands a and b are considered equal if Math.abs(a-b) <= epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers because of rounding-errors.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isEqualTo
BooleanBinding isEqualTo(int other)
BooleanBinding that holds true if this NumberExpression is equal to a constant value. When comparing floating-point numbers it is recommended to use the isEqualTo() method that allows a small tolerance.
- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
isEqualTo
BooleanBinding isEqualTo(int other, double epsilon)
BooleanBinding that holds true if this NumberExpression is equal to a constant value (with a tolerance). Two operands a and b are considered equal if Math.abs(a-b) <= epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isNotEqualTo
BooleanBinding isNotEqualTo(ObservableNumberValue other)
BooleanBinding that holds true if this and another ObservableNumberValue are not equal. When comparing floating-point numbers it is recommended to use the isNotEqualTo() method that allows a small tolerance.
- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
isNotEqualTo
BooleanBinding isNotEqualTo(ObservableNumberValue other, double epsilon)
BooleanBinding that holds true if this and another ObservableNumberValue are not equal (with a tolerance). Two operands a and b are considered not equal if Math.abs(a-b) > epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers because of rounding-errors.
- Parameters:
-
other- the secondObservableNumberValue -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
isNotEqualTo
BooleanBinding isNotEqualTo(double other, double epsilon)
BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). Two operands a and b are considered not equal if Math.abs(a-b) > epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isNotEqualTo
BooleanBinding isNotEqualTo(float other, double epsilon)
BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). Two operands a and b are considered not equal if Math.abs(a-b) > epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isNotEqualTo
BooleanBinding isNotEqualTo(long other)
BooleanBinding that holds true if this NumberExpression is not equal to a constant value. When comparing floating-point numbers it is recommended to use the isNotEqualTo() method that allows a small tolerance.
- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
isNotEqualTo
BooleanBinding isNotEqualTo(long other, double epsilon)
BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). Two operands a and b are considered not equal if Math.abs(a-b) > epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
isNotEqualTo
BooleanBinding isNotEqualTo(int other)
BooleanBinding that holds true if this NumberExpression is not equal to a constant value. When comparing floating-point numbers it is recommended to use the isNotEqualTo() method that allows a small tolerance.
- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
isNotEqualTo
BooleanBinding isNotEqualTo(int other, double epsilon)
BooleanBinding that holds true if this NumberExpression is not equal to a constant value (with a tolerance). Two operands a and b are considered not equal if Math.abs(a-b) > epsilon.
Allowing a small tolerance is recommended when comparing floating-point numbers.
- Parameters:
-
other- the constant value -
epsilon- the permitted tolerance - Returns:
- the new
BooleanBinding
greaterThan
BooleanBinding greaterThan(ObservableNumberValue other)
BooleanBinding that holds true if this NumberExpression is greater than another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
greaterThan
BooleanBinding greaterThan(double other)
BooleanBinding that holds true if this NumberExpression is greater than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThan
BooleanBinding greaterThan(float other)
BooleanBinding that holds true if this NumberExpression is greater than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThan
BooleanBinding greaterThan(long other)
BooleanBinding that holds true if this NumberExpression is greater than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThan
BooleanBinding greaterThan(int other)
BooleanBinding that holds true if this NumberExpression is greater than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThan
BooleanBinding lessThan(ObservableNumberValue other)
BooleanBinding that holds true if this NumberExpression is lesser than another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
lessThan
BooleanBinding lessThan(double other)
BooleanBinding that holds true if this NumberExpression is lesser than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThan
BooleanBinding lessThan(float other)
BooleanBinding that holds true if this NumberExpression is lesser than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThan
BooleanBinding lessThan(long other)
BooleanBinding that holds true if this NumberExpression is lesser than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThan
BooleanBinding lessThan(int other)
BooleanBinding that holds true if this NumberExpression is lesser than a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThanOrEqualTo
BooleanBinding greaterThanOrEqualTo(ObservableNumberValue other)
BooleanBinding that holds true if this NumberExpression is greater than or equal to another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
greaterThanOrEqualTo
BooleanBinding greaterThanOrEqualTo(double other)
BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThanOrEqualTo
BooleanBinding greaterThanOrEqualTo(float other)
BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThanOrEqualTo
BooleanBinding greaterThanOrEqualTo(long other)
BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
greaterThanOrEqualTo
BooleanBinding greaterThanOrEqualTo(int other)
BooleanBinding that holds true if this NumberExpression is greater than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThanOrEqualTo
BooleanBinding lessThanOrEqualTo(ObservableNumberValue other)
BooleanBinding that holds true if this NumberExpression is less than or equal to another ObservableNumberValue.- Parameters:
-
other- the secondObservableNumberValue - Returns:
- the new
BooleanBinding - Throws:
-
NullPointerException- if the otherObservableNumberValueisnull
lessThanOrEqualTo
BooleanBinding lessThanOrEqualTo(double other)
BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThanOrEqualTo
BooleanBinding lessThanOrEqualTo(float other)
BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThanOrEqualTo
BooleanBinding lessThanOrEqualTo(long other)
BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
lessThanOrEqualTo
BooleanBinding lessThanOrEqualTo(int other)
BooleanBinding that holds true if this NumberExpression is less than or equal to a constant value.- Parameters:
-
other- the constant value - Returns:
- the new
BooleanBinding
asString
StringBinding asString()
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 conversion is done without any formatting applied.
- Returns:
- the new
StringBinding
asString
StringBinding asString(String format)
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. See java.util.Formatter for formatting rules.
- Parameters:
-
format- the formattingString - Returns:
- the new
StringBinding
asString
StringBinding asString(Locale locale, String format)
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 formattingString - Returns:
- the new
StringBinding
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.