Package io.vertigo.basics.formatter
Class FormatterDefault
java.lang.Object
io.vertigo.basics.formatter.FormatterDefault
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptiongetFormatter(io.vertigo.core.lang.BasicType dataType) stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType) valueToString(Object objValue, io.vertigo.core.lang.BasicType dataType)
-
Constructor Details
-
FormatterDefault
Constructor.
-
-
Method Details
-
getFormatter
- Parameters:
dataType- Type- Returns:
- Formatter simple utilisé.
-
valueToString
- Specified by:
valueToStringin interfaceFormatter
-
stringToValue
public Object stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType) throws FormatterException - Specified by:
stringToValuein interfaceFormatter- Throws:
FormatterException
-