public class FormatUtils
extends java.lang.Object
| Constructor and Description |
|---|
FormatUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
format(double value,
int decimalPlaces)
Formats a double value with a given number of decimal places.
|
static java.text.DecimalFormat |
getDecimalFormat(int decimalPlaces)
Gets a decimal format that with the desired number of decimal places.
|
static java.text.DecimalFormat |
getDefaultDecimalFormat()
Gets a default decimal format that should be used for formatting decimal values.
|
public static java.text.DecimalFormat getDefaultDecimalFormat()
public static java.text.DecimalFormat getDecimalFormat(int decimalPlaces)
decimalPlaces - The number of decimal places.public static java.lang.String format(double value,
int decimalPlaces)
value - The value to format.decimalPlaces - The desired number of decimal places.