Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571) No functional change, just better JavaDoc git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824124 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -203,7 +203,9 @@ public final class UtilNumber {
|
||||
}
|
||||
|
||||
/**
|
||||
* As above, but use the default properties file
|
||||
* Method to get BigDecimal scale factor from a property. Use the default arithmeticPropertiesFile properties file
|
||||
* @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.decimals")
|
||||
* @return int - Scale factor to pass to BigDecimal's methods. Defaults to DEFAULT_BD_SCALE (2)
|
||||
*/
|
||||
public static int getBigDecimalScale(String property) {
|
||||
return getBigDecimalScale(arithmeticPropertiesFile, property);
|
||||
@@ -221,7 +223,7 @@ public final class UtilNumber {
|
||||
}
|
||||
|
||||
/**
|
||||
* As above, but use the default properties file
|
||||
* Method to get BigDecimal rounding mode from a property. Use the default arithmeticPropertiesFile properties file
|
||||
* @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.rounding")
|
||||
* @return int - Rounding mode to pass to BigDecimal's methods. Defaults to BigDecimal.ROUND_HALF_UP
|
||||
* @deprecated Use {@link #getRoundingMode(String)} instead
|
||||
@@ -250,7 +252,9 @@ public final class UtilNumber {
|
||||
return mode;
|
||||
}
|
||||
/**
|
||||
* As above, but use the default properties file
|
||||
* Method to get BigDecimal rounding mode from a property. Use the default arithmeticPropertiesFile properties file
|
||||
* @param property - Name of the config property from arithmeticPropertiesFile (e.g., "invoice.rounding")
|
||||
* @return RoundingMode - Rounding mode to pass to BigDecimal's methods. Defaults to DEFAULT_BD_ROUNDING_MODE (RoundingMode.HALF_UP)
|
||||
*/
|
||||
public static RoundingMode getRoundingMode(String property) {
|
||||
return getRoundingMode(arithmeticPropertiesFile, property);
|
||||
@@ -259,7 +263,7 @@ public final class UtilNumber {
|
||||
/**
|
||||
* Method to get the RoundingMode rounding mode int value from a string name.
|
||||
* @param value - The name of the mode (e.g., "ROUND_HALF_UP")
|
||||
* @return RoundingMode - The int value of the mode (e.g, RoundingMode.HALF_UP) or null if the input was bad.
|
||||
* @return RoundingMode - The rounding mode value of the mode (e.g, RoundingMode.HALF_UP) or null if the input was bad.
|
||||
*/
|
||||
public static RoundingMode roundingModeFromString(String value) {
|
||||
if (value == null) {
|
||||
|
||||
Reference in New Issue
Block a user