public class DecimalConverter extends Object
Constructor and Description |
---|
DecimalConverter() |
Modifier and Type | Method and Description |
---|---|
static String |
convert(BigDecimal d)
Converts a double to a string with no padding.
|
static String |
convert(BigDecimal d,
int padding)
Converts a decimal to a string with padding.
|
static BigDecimal |
convert(String value)
Convert a String value to a decimal.
|
public static String convert(BigDecimal d)
d
- the BigDecimal to convertconvert(BigDecimal, int)
public static String convert(BigDecimal d, int padding)
d
- the decimal to convertpadding
- the number of zeros to add to end of the formatted decimalpublic static BigDecimal convert(String value) throws FieldConvertError
value
- the String value to convertFieldConvertError
- if the String is not a valid decimal pattern.Copyright © 2021. All rights reserved.