Package com.mayam.wf.attributes.shared
Class ValueNormalizer
java.lang.Object
com.mayam.wf.attributes.shared.ValueNormalizer
Converts values supported by
Attribute
to and/from a string representation.
The Complex
values are by their very nature not supported; these need to
be serialized using the AttributeMapMapper
.- Author:
- Markus MÃ¥rtensson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
convertFromString
(String valueStr, Class<T> valueClass) Converts a string representation into an actual object of the specified value class.convertToString
(Object value) Converts a value object into its corresponding string representation.
-
Constructor Details
-
ValueNormalizer
public ValueNormalizer()
-
-
Method Details
-
convertFromString
Converts a string representation into an actual object of the specified value class.- Parameters:
valueStr
- a valid string representation.valueClass
- the expected, non-Complex, value class.- Returns:
- string converted into object.
-
convertToString
Converts a value object into its corresponding string representation.- Parameters:
value
- any non-Complex value.- Returns:
- corresponding string representation.
-