Interface IValueFormatter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ValueFormatter
,XssSafeValueFormatter
Interface for objects that can format an internal value to a string representation and parse the string
representation back to a value.
- Since:
- 5.1
- Author:
- O. Kerpershoek
-
Method Summary
Modifier and TypeMethodDescriptionformat
(IPrimitiveValue valueObject) This method formats the to a string representation.This method parses the text to a IPrimitiveValue of the type specified by the data type argument.
-
Method Details
-
format
This method formats the to a string representation.- Parameters:
valueObject
- The primitive value whose string representation is requested.- Returns:
- String representation of the primitive value.
-
parse
This method parses the text to a IPrimitiveValue of the type specified by the data type argument.- Parameters:
text
- The input text which should be parsed. Preferably String. However some primitive object handling is included.type
- The data type to which the string should be converted.- Returns:
- The primitive value for the specified data type and text.
- Throws:
ConversionException
- When the text object could not be converted to a value.
-