public abstract class NumberExpressionBase extends java.lang.Object implements NumberExpression
| Constructor and Description |
|---|
NumberExpressionBase() |
| Modifier and Type | Method and Description |
|---|---|
NumberBinding |
add(ObservableNumberValue other)
Creates a new
NumberBinding that calculates
the sum of this NumberExpression and another
ObservableNumberValue. |
StringBinding |
asString()
|
StringBinding |
asString(java.util.Locale locale,
java.lang.String format)
|
StringBinding |
asString(java.lang.String format)
|
NumberBinding |
divide(ObservableNumberValue other)
Creates a new
NumberBinding that calculates
the division of this NumberExpression and another
ObservableNumberValue. |
BooleanBinding |
greaterThan(double other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan(float other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan(int other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan(long other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than a constant value. |
BooleanBinding |
greaterThan(ObservableNumberValue other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than another
ObservableNumberValue. |
BooleanBinding |
greaterThanOrEqualTo(double other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value. |
BooleanBinding |
greaterThanOrEqualTo(float other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value. |
BooleanBinding |
greaterThanOrEqualTo(int other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value. |
BooleanBinding |
greaterThanOrEqualTo(long other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value. |
BooleanBinding |
greaterThanOrEqualTo(ObservableNumberValue other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is greater than or equal to another
ObservableNumberValue. |
BooleanBinding |
isEqualTo(double other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is equal to a constant value (with a
tolerance). |
BooleanBinding |
isEqualTo(float other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is equal to a constant value (with a
tolerance). |
BooleanBinding |
isEqualTo(int other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is equal to a constant value. |
BooleanBinding |
isEqualTo(int other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is equal to a constant value (with a
tolerance). |
BooleanBinding |
isEqualTo(long other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is equal to a constant value. |
BooleanBinding |
isEqualTo(long other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is equal to a constant value (with a
tolerance). |
BooleanBinding |
isEqualTo(ObservableNumberValue other)
Creates a new
BooleanBinding that holds true
if this and another ObservableNumberValue are
equal. |
BooleanBinding |
isEqualTo(ObservableNumberValue other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this and another ObservableNumberValue are
equal (with a tolerance). |
BooleanBinding |
isNotEqualTo(double other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is not equal to a constant value (with a
tolerance). |
BooleanBinding |
isNotEqualTo(float other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is not equal to a constant value (with a
tolerance). |
BooleanBinding |
isNotEqualTo(int other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is not equal to a constant value. |
BooleanBinding |
isNotEqualTo(int other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is not equal to a constant value (with a
tolerance). |
BooleanBinding |
isNotEqualTo(long other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is not equal to a constant value. |
BooleanBinding |
isNotEqualTo(long other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this NumberExpression is not equal to a constant value (with a
tolerance). |
BooleanBinding |
isNotEqualTo(ObservableNumberValue other)
Creates a new
BooleanBinding that holds true
if this and another ObservableNumberValue are
not equal. |
BooleanBinding |
isNotEqualTo(ObservableNumberValue other,
double epsilon)
Creates a new
BooleanBinding that holds true
if this and another ObservableNumberValue are
not equal (with a tolerance). |
BooleanBinding |
lessThan(double other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan(float other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan(int other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan(long other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is lesser than a constant value. |
BooleanBinding |
lessThan(ObservableNumberValue other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is lesser than another
ObservableNumberValue. |
BooleanBinding |
lessThanOrEqualTo(double other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value. |
BooleanBinding |
lessThanOrEqualTo(float other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value. |
BooleanBinding |
lessThanOrEqualTo(int other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value. |
BooleanBinding |
lessThanOrEqualTo(long other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value. |
BooleanBinding |
lessThanOrEqualTo(ObservableNumberValue other)
Creates a new
BooleanBinding that holds true
if this NumberExpression is less than or equal to another
ObservableNumberValue. |
NumberBinding |
multiply(ObservableNumberValue other)
Creates a new
NumberBinding that calculates
the product of this NumberExpression and another
ObservableNumberValue. |
static <S extends java.lang.Number> |
numberExpression(ObservableNumberValue value)
Returns an
NumberExpressionBase that wraps a
ObservableNumberValue. |
NumberBinding |
subtract(ObservableNumberValue other)
Creates a new
NumberBinding that calculates
the difference of this NumberExpression and another
ObservableNumberValue. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, add, add, add, divide, divide, divide, divide, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtractdoubleValue, floatValue, intValue, longValueaddListener, getValue, removeListeneraddListener, removeListenerpublic static <S extends java.lang.Number> NumberExpressionBase numberExpression(ObservableNumberValue value)
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.value - The source ObservableNumberValueNumberExpressionBase that wraps the
ObservableNumberValue if necessaryjava.lang.NullPointerException - if value is nullpublic NumberBinding add(ObservableNumberValue other)
NumberExpressionNumberBinding that calculates
the sum of this NumberExpression and another
ObservableNumberValue.add in interface NumberExpressionother - the second ObservableNumberValueNumberBindingpublic NumberBinding subtract(ObservableNumberValue other)
NumberExpressionNumberBinding that calculates
the difference of this NumberExpression and another
ObservableNumberValue.subtract in interface NumberExpressionother - the second ObservableNumberValueNumberBindingpublic NumberBinding multiply(ObservableNumberValue other)
NumberExpressionNumberBinding that calculates
the product of this NumberExpression and another
ObservableNumberValue.multiply in interface NumberExpressionother - the second ObservableNumberValueNumberBindingpublic NumberBinding divide(ObservableNumberValue other)
NumberExpressionNumberBinding that calculates
the division of this NumberExpression and another
ObservableNumberValue.divide in interface NumberExpressionother - the second ObservableNumberValueNumberBindingpublic BooleanBinding isEqualTo(ObservableNumberValue other)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the second ObservableNumberValueBooleanBindingpublic BooleanBinding isEqualTo(ObservableNumberValue other, double epsilon)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the second ObservableNumberValueepsilon - the toleranceBooleanBindingpublic BooleanBinding isEqualTo(double other, double epsilon)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isEqualTo(float other, double epsilon)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isEqualTo(long other)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding isEqualTo(long other, double epsilon)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isEqualTo(int other)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding isEqualTo(int other, double epsilon)
NumberExpressionBooleanBinding 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.
isEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isNotEqualTo(ObservableNumberValue other)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the second ObservableNumberValueBooleanBindingpublic BooleanBinding isNotEqualTo(ObservableNumberValue other, double epsilon)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the second ObservableNumberValueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isNotEqualTo(double other, double epsilon)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isNotEqualTo(float other, double epsilon)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isNotEqualTo(long other)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding isNotEqualTo(long other, double epsilon)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding isNotEqualTo(int other)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding isNotEqualTo(int other, double epsilon)
NumberExpressionBooleanBinding 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.
isNotEqualTo in interface NumberExpressionother - the constant valueepsilon - the permitted toleranceBooleanBindingpublic BooleanBinding greaterThan(ObservableNumberValue other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than another
ObservableNumberValue.greaterThan in interface NumberExpressionother - the second ObservableNumberValueBooleanBindingpublic BooleanBinding greaterThan(double other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than a constant value.greaterThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThan(float other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than a constant value.greaterThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThan(long other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than a constant value.greaterThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThan(int other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than a constant value.greaterThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThan(ObservableNumberValue other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is lesser than another
ObservableNumberValue.lessThan in interface NumberExpressionother - the second ObservableNumberValueBooleanBindingpublic BooleanBinding lessThan(double other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is lesser than a constant value.lessThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThan(float other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is lesser than a constant value.lessThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThan(long other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is lesser than a constant value.lessThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThan(int other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is lesser than a constant value.lessThan in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThanOrEqualTo(ObservableNumberValue other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than or equal to another
ObservableNumberValue.greaterThanOrEqualTo in interface NumberExpressionother - the second ObservableNumberValueBooleanBindingpublic BooleanBinding greaterThanOrEqualTo(double other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value.greaterThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThanOrEqualTo(float other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value.greaterThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThanOrEqualTo(long other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value.greaterThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding greaterThanOrEqualTo(int other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is greater than or equal to a constant
value.greaterThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThanOrEqualTo(ObservableNumberValue other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is less than or equal to another
ObservableNumberValue.lessThanOrEqualTo in interface NumberExpressionother - the second ObservableNumberValueBooleanBindingpublic BooleanBinding lessThanOrEqualTo(double other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value.lessThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThanOrEqualTo(float other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value.lessThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThanOrEqualTo(long other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value.lessThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic BooleanBinding lessThanOrEqualTo(int other)
NumberExpressionBooleanBinding that holds true
if this NumberExpression is less than or equal to a constant
value.lessThanOrEqualTo in interface NumberExpressionother - the constant valueBooleanBindingpublic StringBinding asString()
NumberExpressionStringBinding 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.
asString in interface NumberExpressionStringBindingpublic StringBinding asString(java.lang.String format)
NumberExpressionStringBinding 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.
asString in interface NumberExpressionformat - the formatting StringStringBindingpublic StringBinding asString(java.util.Locale locale, java.lang.String format)
NumberExpressionStringBinding 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.
asString in interface NumberExpressionformat - the formatting StringStringBindingCopyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.