|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectorg.apache.commons.lang.NumberRange
Represents a range of Number objects.
This class uses double comparisons. This means that it
is unsuitable for dealing with large Long, BigDecimal
or BigInteger numbers.
| コンストラクタの概要 | |
NumberRange(Number num)
推奨されていません。 Constructs a new NumberRange using
number as both the minimum and maximum in
this range. |
|
NumberRange(Number min,
Number max)
推奨されていません。 Constructs a new NumberRange with the specified
minimum and maximum numbers. |
|
| メソッドの概要 | |
boolean |
equals(Object obj)
推奨されていません。 Indicates whether some other Object is
"equal" to this one. |
Number |
getMaximum()
推奨されていません。 Returns the maximum number in this range. |
Number |
getMinimum()
推奨されていません。 Returns the minimum number in this range. |
int |
hashCode()
推奨されていません。 Returns a hash code value for this object. |
boolean |
includesNumber(Number number)
推奨されていません。 Tests whether the specified number occurs within
this range using double comparison. |
boolean |
includesRange(NumberRange range)
推奨されていません。 Tests whether the specified range occurs entirely within this range using double comparison. |
boolean |
overlaps(NumberRange range)
推奨されていません。 Tests whether the specified range overlaps with this range using double comparison. |
String |
toString()
推奨されていません。 Returns the string representation of this range. |
| クラス java.lang.Object から継承したメソッド |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
public NumberRange(Number num)
Constructs a new NumberRange using
number as both the minimum and maximum in
this range.
num - the number to use for this range
NullPointerException - if the number is null
public NumberRange(Number min,
Number max)
Constructs a new NumberRange with the specified
minimum and maximum numbers.
If the maximum is less than the minimum, the range will be constructed from the minimum value to the minimum value, not what you would expect!.
min - the minimum number in this rangemax - the maximum number in this range
NullPointerException - if either the minimum or maximum number is
null| メソッドの詳細 |
public Number getMinimum()
Returns the minimum number in this range.
public Number getMaximum()
Returns the maximum number in this range.
public boolean includesNumber(Number number)
Tests whether the specified number occurs within
this range using double comparison.
number - the number to test
true if the specified number occurs within this
range; otherwise, falsepublic boolean includesRange(NumberRange range)
Tests whether the specified range occurs entirely within this
range using double comparison.
range - the range to test
true if the specified range occurs entirely within
this range; otherwise, falsepublic boolean overlaps(NumberRange range)
Tests whether the specified range overlaps with this range
using double comparison.
range - the range to test
true if the specified range overlaps with this
range; otherwise, falsepublic boolean equals(Object obj)
Indicates whether some other Object is
"equal" to this one.
obj - the reference object with which to compare
true if this object is the same as the obj
argument; false otherwisepublic int hashCode()
Returns a hash code value for this object.
public String toString()
Returns the string representation of this range.
This string is the string representation of the minimum and maximum numbers in the range, separated by a hyphen. If a number is negative, then it is enclosed in parentheses.
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||