Class ValueNormalizer

java.lang.Object
com.mayam.wf.attributes.shared.ValueNormalizer

public class ValueNormalizer extends Object
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 Details

    • ValueNormalizer

      public ValueNormalizer()
  • Method Details

    • convertFromString

      public <T> T convertFromString(String valueStr, Class<T> valueClass)
      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

      public String convertToString(Object value)
      Converts a value object into its corresponding string representation.
      Parameters:
      value - any non-Complex value.
      Returns:
      corresponding string representation.