public class Formats
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.text.NumberFormat |
getCurrencyInstance()
This method returns a format object to format a number as currency in the local style.
|
static java.text.DateFormat |
getDateInstance()
This method returns a format object to format a number as a date in the local style.
|
static java.text.DateFormat |
getDateTimeInstance()
This method returns a format object to format a number as a date and time in the local style.
|
static java.text.NumberFormat |
getDecimalInstance(int numDecimals)
This method returns a NumberFormat that will format a number to have the specified number of decimal places.
|
static java.text.NumberFormat |
getIntegerInstance()
This method returns a format object to format a number as an integer (i.e.
|
static java.text.NumberFormat |
getPercentInstance()
This method returns a format object to format a number as a percentage.
|
static java.text.DateFormat |
getTimeInstance()
This method returns a format object to format a number as a time in the local style.
|
public static java.text.NumberFormat getDecimalInstance(int numDecimals)
numDecimals
- The number of decimals the format will format numbers to have.public static java.text.NumberFormat getCurrencyInstance()
public static java.text.NumberFormat getPercentInstance()
public static java.text.NumberFormat getIntegerInstance()
public static final java.text.DateFormat getDateInstance()
public static final java.text.DateFormat getDateTimeInstance()
public static final java.text.DateFormat getTimeInstance()