|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NumberConverter
A converter for instances representing numbers.
| Field Summary | |
|---|---|
static String |
CURRENCY
A pattern for currency formatting. |
static String |
CURRENCY_IN_CENTS
A pattern for currency in cents formatting. |
static String |
DEFAULT
A pattern for default formatting. |
static String |
INTEGER
A pattern for integer formatting. |
static String |
NUMBER
A pattern for number formatting. |
static String |
PERCENT
A pattern for percent formatting. |
| Method Summary | |
|---|---|
NumberFormat |
getNumberFormat(String pattern)
Gets a number format for the specified pattern. |
NumberFormat |
getNumberFormat(String pattern,
Locale locale)
Gets a number format for the specified pattern and locale. |
| Methods inherited from interface org.norther.tammi.core.converter.ObjectConverter |
|---|
getFormatPattern, getInstance, getInstance, getInstance, getLocalizedPattern, getResourceFinderName, isConversionSupported, setResourceFinderName, toString, toString, toString, toStrings, toStrings, toStrings |
| Field Detail |
|---|
static final String DEFAULT
static final String NUMBER
static final String INTEGER
static final String PERCENT
static final String CURRENCY
static final String CURRENCY_IN_CENTS
When an instance is returned the given value will be multiplied with 100 as it will have two decimals. When an instance is converted to a string the value will be divided by 100 in order to have two decimals.
| Method Detail |
|---|
NumberFormat getNumberFormat(String pattern)
pattern - the pattern.
NumberFormat,
DecimalFormat
NumberFormat getNumberFormat(String pattern,
Locale locale)
pattern - the pattern.locale - the locale.
NumberFormat,
DecimalFormat
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||