public abstract class NumberExpressionBase extends Object implements NumberExpression
NumberExpressionBase
には、すべてのNumberExpressionサブクラスに共通の優れたスタイルのバインディングを生成する便利なメソッドが含まれています。
NumberExpressionBaseは、特定の数値型の特定のNumberExpressionサブクラスの共通のコードの場所として役立ちます。
IntegerExpression
、LongExpression
、FloatExpression
、DoubleExpression
コンストラクタと説明 |
---|
NumberExpressionBase() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, add, add, divide, divide, divide, divide, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtract
doubleValue, floatValue, intValue, longValue
addListener、getValue、removeListener
addListener、removeListener
public static <S extends Number> NumberExpressionBase numberExpression(ObservableNumberValue value)
ObservableNumberValue
をラップするNumberExpressionBase
を返します。ObservableNumberValue
がすでにNumberExpressionBase
のインスタンスである場合に返されます。それ以外の場合、ObservableNumberValue
にバインドされる新しいNumberBinding
が作成されます。value
- ソースObservableNumberValue
ObservableNumberValue
をラップするNumberExpressionBase
NullPointerException
- value
がnull
の場合public NumberBinding add(ObservableNumberValue other)
NumberExpression
add
、インタフェース: NumberExpression
other
- 2つ目のObservableNumberValue
NumberBinding
public NumberBinding subtract(ObservableNumberValue other)
NumberExpression
subtract
、インタフェース: NumberExpression
other
- 2つ目のObservableNumberValue
NumberBinding
public NumberBinding multiply(ObservableNumberValue other)
NumberExpression
multiply
、インタフェース: NumberExpression
other
- 2つ目のObservableNumberValue
NumberBinding
public NumberBinding divide(ObservableNumberValue other)
NumberExpression
divide
、インタフェース: NumberExpression
other
- 2つ目のObservableNumberValue
NumberBinding
public BooleanBinding isEqualTo(ObservableNumberValue other)
NumberExpression
ObservableNumberValue
が同等である場合にtrue
を保持する新しいBooleanBinding
を作成します。
浮動小数点数を比較する場合、少しの許容範囲を許可するisEqualTo()
メソッドを使用することをお薦めします。
NumberExpression
のisEqualTo
other
- 2つ目のObservableNumberValue
BooleanBinding
public BooleanBinding isEqualTo(ObservableNumberValue other, double epsilon)
NumberExpression
ObservableNumberValue
が同等である場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
Math.abs(a-b) <= epsilon
の場合、2つのオペランドa
およびb
が同等とみなされます。
丸め誤差のために浮動小数点数を比較する場合に少しの許容範囲を許可することをお薦めします。
NumberExpression
のisEqualTo
other
- 2つ目のObservableNumberValue
epsilon
- 許容範囲BooleanBinding
public BooleanBinding isEqualTo(double other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等である場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
Math.abs(a-b) <= epsilon
の場合、2つのオペランドa
およびb
が同等とみなされます。
丸め誤差のために浮動小数点数を比較する場合に少しの許容範囲を許可することをお薦めします。
NumberExpression
のisEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isEqualTo(float other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等である場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
Math.abs(a-b) <= epsilon
の場合、2つのオペランドa
およびb
が同等とみなされます。
丸め誤差のために浮動小数点数を比較する場合に少しの許容範囲を許可することをお薦めします。
NumberExpression
のisEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isEqualTo(long other)
NumberExpression
NumberExpression
が定数値と同等である場合にtrue
を保持する新しいBooleanBinding
を作成します。
浮動小数点数を比較する場合、少しの許容範囲を許可するisEqualTo()
メソッドを使用することをお薦めします。
NumberExpression
のisEqualTo
other
- 定数値BooleanBinding
public BooleanBinding isEqualTo(long other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等である場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
Math.abs(a-b) <= epsilon
の場合、2つのオペランドa
およびb
が同等とみなされます。
丸め誤差のために浮動小数点数を比較する場合に少しの許容範囲を許可することをお薦めします。
NumberExpression
のisEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isEqualTo(int other)
NumberExpression
NumberExpression
が定数値と同等である場合にtrue
を保持する新しいBooleanBinding
を作成します。
浮動小数点数を比較する場合、少しの許容範囲を許可するisEqualTo()
メソッドを使用することをお薦めします。
NumberExpression
のisEqualTo
other
- 定数値BooleanBinding
public BooleanBinding isEqualTo(int other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等である場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
Math.abs(a-b) <= epsilon
の場合、2つのオペランドa
およびb
が同等とみなされます。
浮動小数点数を比較する場合、少しの許容範囲を許可することをお薦めします。
NumberExpression
のisEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isNotEqualTo(ObservableNumberValue other)
NumberExpression
ObservableNumberValue
が同等でない場合にtrue
を保持する新しいBooleanBinding
を作成します。
浮動小数点数を比較する場合、少しの許容範囲を許可するisNotEqualTo()
メソッドを使用することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 2つ目のObservableNumberValue
BooleanBinding
public BooleanBinding isNotEqualTo(ObservableNumberValue other, double epsilon)
NumberExpression
ObservableNumberValue
が同等でない場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
2つのオペランドa
およびb
は、Math.abs(a-b) > epsilon
である場合に同等でないとみなされます。
丸め誤差のために浮動小数点数を比較する場合に少しの許容範囲を許可することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 2つ目のObservableNumberValue
epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isNotEqualTo(double other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等でない場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
2つのオペランドa
およびb
は、Math.abs(a-b) > epsilon
である場合に同等でないとみなされます。
浮動小数点数を比較する場合、少しの許容範囲を許可することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isNotEqualTo(float other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等でない場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
2つのオペランドa
およびb
は、Math.abs(a-b) > epsilon
である場合に同等でないとみなされます。
浮動小数点数を比較する場合、少しの許容範囲を許可することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isNotEqualTo(long other)
NumberExpression
NumberExpression
が定数値と同等でない場合にtrue
を保持する新しいBooleanBinding
を作成します。
浮動小数点数を比較する場合、少しの許容範囲を許可するisNotEqualTo()
メソッドを使用することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 定数値BooleanBinding
public BooleanBinding isNotEqualTo(long other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等でない場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
2つのオペランドa
およびb
は、Math.abs(a-b) > epsilon
である場合に同等でないとみなされます。
浮動小数点数を比較する場合、少しの許容範囲を許可することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding isNotEqualTo(int other)
NumberExpression
NumberExpression
が定数値と同等でない場合にtrue
を保持する新しいBooleanBinding
を作成します。
浮動小数点数を比較する場合、少しの許容範囲を許可するisNotEqualTo()
メソッドを使用することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 定数値BooleanBinding
public BooleanBinding isNotEqualTo(int other, double epsilon)
NumberExpression
NumberExpression
が定数値と同等でない場合(許容範囲を含む)にtrue
を保持する新しいBooleanBinding
を作成します。
2つのオペランドa
およびb
は、Math.abs(a-b) > epsilon
である場合に同等でないとみなされます。
浮動小数点数を比較する場合、少しの許容範囲を許可することをお薦めします。
NumberExpression
のisNotEqualTo
other
- 定数値epsilon
- 許可された許容範囲BooleanBinding
public BooleanBinding greaterThan(ObservableNumberValue other)
NumberExpression
NumberExpression
のgreaterThan
other
- 2つ目のObservableNumberValue
BooleanBinding
public BooleanBinding greaterThan(double other)
NumberExpression
NumberExpression
のgreaterThan
other
- 定数値BooleanBinding
public BooleanBinding greaterThan(float other)
NumberExpression
NumberExpression
のgreaterThan
other
- 定数値BooleanBinding
public BooleanBinding greaterThan(long other)
NumberExpression
NumberExpression
のgreaterThan
other
- 定数値BooleanBinding
public BooleanBinding greaterThan(int other)
NumberExpression
NumberExpression
のgreaterThan
other
- 定数値BooleanBinding
public BooleanBinding lessThan(ObservableNumberValue other)
NumberExpression
NumberExpression
のlessThan
other
- 2つ目のObservableNumberValue
BooleanBinding
public BooleanBinding lessThan(double other)
NumberExpression
NumberExpression
のlessThan
other
- 定数値BooleanBinding
public BooleanBinding lessThan(float other)
NumberExpression
NumberExpression
のlessThan
other
- 定数値BooleanBinding
public BooleanBinding lessThan(long other)
NumberExpression
NumberExpression
のlessThan
other
- 定数値BooleanBinding
public BooleanBinding lessThan(int other)
NumberExpression
NumberExpression
のlessThan
other
- 定数値BooleanBinding
public BooleanBinding greaterThanOrEqualTo(ObservableNumberValue other)
NumberExpression
NumberExpression
のgreaterThanOrEqualTo
other
- 2つ目のObservableNumberValue
BooleanBinding
public BooleanBinding greaterThanOrEqualTo(double other)
NumberExpression
NumberExpression
のgreaterThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding greaterThanOrEqualTo(float other)
NumberExpression
NumberExpression
のgreaterThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding greaterThanOrEqualTo(long other)
NumberExpression
NumberExpression
のgreaterThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding greaterThanOrEqualTo(int other)
NumberExpression
NumberExpression
のgreaterThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding lessThanOrEqualTo(ObservableNumberValue other)
NumberExpression
NumberExpression
のlessThanOrEqualTo
other
- 2つ目のObservableNumberValue
BooleanBinding
public BooleanBinding lessThanOrEqualTo(double other)
NumberExpression
NumberExpression
のlessThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding lessThanOrEqualTo(float other)
NumberExpression
NumberExpression
のlessThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding lessThanOrEqualTo(long other)
NumberExpression
NumberExpression
のlessThanOrEqualTo
other
- 定数値BooleanBinding
public BooleanBinding lessThanOrEqualTo(int other)
NumberExpression
NumberExpression
のlessThanOrEqualTo
other
- 定数値BooleanBinding
public StringBinding asString()
NumberExpression
String
に変換されたNumberExpression
の値を保持するStringBinding
を作成します。このNumberExpression
の値が変更される場合、StringBinding
の値が自動的に更新されます。
書式設定を適用せずに変換が実行されます。
NumberExpression
のasString
StringBinding
public StringBinding asString(String format)
NumberExpression
String
に変換されたNumberExpression
の値を保持するStringBinding
を作成します。このNumberExpression
の値が変更される場合、StringBinding
の値が自動的に更新されます。
書式設定しているString
に従って、結果が書式設定されます。ルールの書式設定は、java.util.Formatter
を参照してください。
NumberExpression
のasString
format
- 書式設定しているString
StringBinding
public StringBinding asString(Locale locale, String format)
NumberExpression
String
に変換されたNumberExpression
の値を保持するStringBinding
を作成します。このNumberExpression
の値が変更される場合、StringBinding
の値が自動的に更新されます。
書式設定しているString
に従って結果が書式設定され、Locale
に渡されます。ルールの書式設定は、java.util.Formatter
を参照してください。Locale
の詳細は、java.util.Locale
を参照してください。
NumberExpression
のasString
format
- 書式設定しているString
StringBinding
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.