|
IBM Rational Functional Tester Version 8.1.1000 IBM Rational Functional Tester API Reference Project Version 2.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rational.test.ft.value.Pattern com.rational.test.ft.value.NumericRange
public class NumericRange
Serves as a lower and upper boundary for a target value.
This class includes a metadata type of property that controls whether the upper or lower boundaries are both included in comparisons
against the range. Because the upper and lower boundaries are generic
Number
types, both integer and floating point ranges can be supported by this one class.
Field Summary | |
---|---|
static int |
LOWER
Include the lower bound and not the upper bound of the numeric range in any comparisons. |
static int |
LOWER_AND_UPPER
Include both lower and upper bounds of the numeric range in any comparisons. |
static int |
NEITHER
Do not include the lower or upper bound of the numeric range in any comparisons. |
static int |
UPPER
Include the upper bound and not the lower bound of the numeric range in any comparisons. |
Constructor Summary | |
---|---|
NumericRange(java.lang.Number original, int compareBounds, boolean tryUnknownAsLong)
Specifies the numeric range and how the boundaries are treated in a range comparison. |
|
NumericRange(java.lang.Number lower, java.lang.Number upper, int compareBounds)
Specifies the numeric range and how the boundaries are treated in a range comparison. |
|
NumericRange(java.lang.Number lower, java.lang.Number upper, int compareBounds, java.lang.Object originalValue)
Specifies the numeric range and how the boundaries are treated in a range comparison. |
|
NumericRange(java.lang.Object originalObj, int compareBounds, boolean tryUnknownAsLong, boolean isString)
Specifies the numeric range and how the boundaries are treated in a range comparison. |
|
NumericRange(java.lang.String original, int compareBounds, boolean tryUnknownAsLong)
Specifies the numeric range and how the boundaries are treated in a range comparison. |
Method Summary | |
---|---|
static boolean |
canConvert(java.lang.String text)
Returns true if text can be converted into a number. |
boolean |
equals(java.lang.Object right)
Overloads the default Object.equals to check the specific range that is being compared. |
int |
getCompareBounds()
Returns the flag that determines how the range boundaries are treated in a range comparison. |
java.lang.Number |
getLower()
Returns the lower boundary of the numeric range. |
static java.lang.Number |
getNumber(java.lang.String text)
Returns a Number converted from text. |
static java.lang.String |
getText(int compareBounds)
Returns a text image for the compareBounds attribute. |
java.lang.Number |
getUpper()
Returns the upper boundary of the numeric range. |
int |
hashCode()
Overloads the java.lang.Object core specification to return a data-specific hash value rather than the default instance-specific hash code. |
boolean |
isValidRange()
Returns true if the current values denote an invalid range. |
static boolean |
isValidRange(java.lang.Number lower, java.lang.Number upper, int compareBounds)
Returns true if the specified values denote an invalid range. |
void |
setCompareBounds(int compareBounds)
Defines how the range boundaries are treated in a range comparison. |
void |
setLower(java.lang.Number lower)
Sets the lower boundary of the numeric range. |
void |
setUpper(java.lang.Number upper)
Sets the upper boundary of the numeric range. |
java.lang.String |
toString()
Creates a string of the value that this class represents. |
Methods inherited from class com.rational.test.ft.value.Pattern |
---|
getOriginalValue, setOriginalValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LOWER_AND_UPPER
public static final int LOWER
public static final int UPPER
public static final int NEITHER
Constructor Detail |
---|
public NumericRange(java.lang.Number lower, java.lang.Number upper, int compareBounds, java.lang.Object originalValue)
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
public NumericRange(java.lang.Number lower, java.lang.Number upper, int compareBounds)
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
public NumericRange(java.lang.String original, int compareBounds, boolean tryUnknownAsLong)
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
public NumericRange(java.lang.Number original, int compareBounds, boolean tryUnknownAsLong)
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
public NumericRange(java.lang.Object originalObj, int compareBounds, boolean tryUnknownAsLong, boolean isString)
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
Method Detail |
---|
public java.lang.Number getLower()
public void setLower(java.lang.Number lower)
public java.lang.Number getUpper()
public void setUpper(java.lang.Number upper)
public int getCompareBounds()
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
public void setCompareBounds(int compareBounds)
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
public boolean isValidRange()
true
if the current values denote an invalid range.
public static boolean isValidRange(java.lang.Number lower, java.lang.Number upper, int compareBounds)
true
if the specified values denote an invalid range.
public static java.lang.String getText(int compareBounds)
compareBounds
attribute.
LOWER_AND_UPPER
,
LOWER
,
UPPER
,
NEITHER
,
getCompareBounds()
,
setCompareBounds(int)
public boolean equals(java.lang.Object right)
Object.equals
to check the specific range that is being compared.
equals
in class java.lang.Object
public int hashCode()
java.lang.Object
core specification to return a data-specific hash value rather than the default instance-specific hash code.
hashCode
in class java.lang.Object
public static java.lang.Number getNumber(java.lang.String text)
public static boolean canConvert(java.lang.String text)
true
if text can be converted into a number.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |