public abstract class NumberPatternFormat<T> extends Object implements PatternFormat<T>
Constructor and Description |
---|
NumberPatternFormat() |
NumberPatternFormat(String pattern,
Locale locale) |
NumberPatternFormat(String pattern,
Locale locale,
int precision,
String rounding,
String decimalSeparator,
String groupingSeparator) |
Modifier and Type | Method and Description |
---|---|
String |
format(T object)
Formats the object into a String
|
Locale |
getLocale() |
protected NumberFormat |
getNumberFormat()
Gets the number format if in use.
|
String |
getPattern()
Method used to retrieve the pattern for the format
|
int |
getPrecision() |
String |
getRounding() |
abstract T |
parse(String string)
Parses a String into an object
|
void |
setLocale(Locale locale) |
void |
setPattern(String pattern) |
void |
setPrecision(int precision) |
void |
setRounding(String rounding) |
public String format(T object) throws Exception
Format
public abstract T parse(String string) throws Exception
Format
protected NumberFormat getNumberFormat()
public String getPattern()
PatternFormat
getPattern
in interface PatternFormat<T>
public void setPattern(String pattern)
public int getPrecision()
public void setPrecision(int precision)
public String getRounding()
public void setRounding(String rounding)
public Locale getLocale()
public void setLocale(Locale locale)
Apache Camel