Package io.vertigo.basics.formatter
Class FormatterDefault
- java.lang.Object
-
- io.vertigo.basics.formatter.FormatterDefault
-
- All Implemented Interfaces:
Formatter
public final class FormatterDefault extends Object implements Formatter
Default formatter for boolean, number, date and string. It's possible to override default formatting args by registering specifics parameters with a conventional name. fmtStringDefaultArgs, fmtLocalDateDefaultArgs, fmtInstantDefaultArgs, fmtBooleanDefaultArgs, fmtNumberDefaultArgs- Author:
- pchretien, npiedeloup
-
-
Constructor Summary
Constructors Constructor Description FormatterDefault(String args)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Formatter
getFormatter(io.vertigo.core.lang.BasicType dataType)
Object
stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType)
String
valueToString(Object objValue, io.vertigo.core.lang.BasicType dataType)
-
-
-
Constructor Detail
-
FormatterDefault
public FormatterDefault(String args)
Constructor.
-
-
Method Detail
-
getFormatter
public Formatter getFormatter(io.vertigo.core.lang.BasicType dataType)
- Parameters:
dataType
- Type- Returns:
- Formatter simple utilisé.
-
valueToString
public String valueToString(Object objValue, io.vertigo.core.lang.BasicType dataType)
- Specified by:
valueToString
in interfaceFormatter
-
stringToValue
public Object stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType) throws FormatterException
- Specified by:
stringToValue
in interfaceFormatter
- Throws:
FormatterException
-
-