public interface AQDoubleFactory
Double
data type.
An instance of this interface is available via aqua.type.getDouble(). (For technical reasons, aqua.type.double is not available).
Modifier and Type | Method and Description |
---|---|
boolean |
isCloseTo(java.lang.Object a,
java.lang.Object b,
java.lang.Object distance)
Checks if two values are within the specified distance.
|
boolean |
isGreater(java.lang.Object a,
java.lang.Object b)
Checks if the value is greater than a specified threshold.
|
boolean |
isGreaterOrEqual(java.lang.Object a,
java.lang.Object b)
Checks if the value is less than or equals to a specified threshold.
|
boolean |
isInRange(java.lang.Object value,
java.lang.Object min,
java.lang.Object max)
Checks if the value is within a specified range, inclusive.
|
boolean |
isLess(java.lang.Object a,
java.lang.Object b)
Checks if the value is less than a specified threshold.
|
boolean |
isLessOrEqual(java.lang.Object a,
java.lang.Object b)
Checks if the value is less than or equals to a specified threshold.
|
boolean |
isValid(java.lang.String value)
Interprets a specified value as a Double (using default platform locale).
|
java.lang.Double |
parse(java.lang.Object value)
Creates a Double instance assuming default platform locale.
|
java.lang.Double |
parse(java.lang.String value,
java.lang.String pattern)
Creates a Double instance using a specified pattern and locale.
|
java.lang.Double |
parse(java.lang.String value,
java.lang.String pattern,
java.lang.String locale)
Interprets a specified value as a Double using a specified pattern and locale.
|
java.lang.Double parse(java.lang.Object value)
If conversion is successful, the method returns the resulting Double object, otherwise it throws an exception.
value
- the specified valuejava.lang.Double parse(java.lang.String value, java.lang.String pattern)
If conversion is successful, the method returns the resulting Double object, otherwise it throws an exception.
value
- the specified valuepattern
- the patternjava.lang.Double parse(java.lang.String value, java.lang.String pattern, java.lang.String locale)
If conversion is successful, the method returns the resulting Double object, otherwise it throws an exception.
value
- the specified valuepattern
- the patternlocale
- the localeboolean isInRange(java.lang.Object value, java.lang.Object min, java.lang.Object max)
value
- The value in question.min
- Start of the range.max
- End of the range.
* @throws Exception
If any of the parameters cannot be converted to a double.boolean isLess(java.lang.Object a, java.lang.Object b)
a
- The double value to compare to.b
- The double value to compare with.boolean isLessOrEqual(java.lang.Object a, java.lang.Object b)
a
- The double value to compare to.b
- The double value to compare with.boolean isGreater(java.lang.Object a, java.lang.Object b)
a
- The double value to compare to.b
- The double value to compare with.boolean isGreaterOrEqual(java.lang.Object a, java.lang.Object b)
a
- The double value to compare to.b
- The double value to compare with.boolean isCloseTo(java.lang.Object a, java.lang.Object b, java.lang.Object distance)
a
- The 1st big decimal value.b
- The 2nd big decimal value.distance
- The distance, as specified by the user to compare the difference between
a and b.boolean isValid(java.lang.String value)
If conversion is successful, the method returns resulting Double object, otherwise it returns null.
value
- the specified value
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.