public interface AQBigDecimalFactory
BigDecimal
data type.
An instance of this interface is available via aqua.type.bigDecimal alias.
Modifier and Type | Method and Description |
---|---|
boolean |
isCloseTo(Object a,
Object b,
Object distance)
Checks if two values are within the specified distance.
|
boolean |
isGreater(Object a,
Object b)
Checks if the parameter value a is greater than the parameter value b.
|
boolean |
isGreaterOrEqual(Object a,
Object b)
Checks if the parameter value a is greater than or equal to the parameter value b.
|
boolean |
isInRange(Object value,
Object min,
Object max)
Checks if the value is within a specified range, inclusive.
|
boolean |
isLess(Object a,
Object b)
Checks if the parameter value a is less than the parameter value b.
|
boolean |
isLessOrEqual(Object a,
Object b)
Checks if the parameter value a is less than or equal to the parameter value b.
|
boolean |
isValid(String value)
Interprets a specified value as a BigDecimal (using default platform locale).
|
BigDecimal |
parse(Object value)
Creates a BigDecimal instance assuming default platform locale.
|
BigDecimal |
parse(String value,
String pattern)
Creates a BigDecimal instance using a specified pattern and locale.
|
BigDecimal |
parse(String value,
String pattern,
String locale)
Interprets a specified value as a BigDecimal using a specified pattern and locale.
|
BigDecimal parse(Object value)
If conversion is successful, the method returns the resulting BigDecimal object, otherwise it throws a RuntimeException.
value
- A String
or a number value.BigDecimal parse(String value, String pattern)
If conversion is successful, the method returns the resulting BigDecimal object, otherwise it throws a RuntimeException.
value
- String value to be parsed.pattern
- A DecimalFormat
pattern.BigDecimal parse(String value, String pattern, String locale)
If conversion is successful, the method returns the resulting BigDecimal object, otherwise it throws a RuntimeException.
value
- String value to be parsed.pattern
- A DecimalFormat
pattern.locale
- Localeboolean isInRange(Object value, Object min, Object max)
value
- The value to in question.min
- Start of the range.max
- End of the range.boolean isLess(Object a, Object b)
a
- BigDecimal value to compare to.b
- BigDecimal value to compare with.boolean isLessOrEqual(Object a, Object b)
a
- BigDecimal value to compare to.b
- BigDecimal value to compare with.boolean isGreater(Object a, Object b)
a
- BigDecimal value to compare to.b
- BigDecimal value to compare with.boolean isGreaterOrEqual(Object a, Object b)
a
- BigDecimal value to compare to.b
- BigDecimal value to compare with.boolean isCloseTo(Object a, Object b, 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(String value)
If the value specified is a valid BigDecimal, true will be returned.
value
- The string in specified.
Copyright © 2017 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.