Class StandardDecoder

java.lang.Object
org.smartparam.engine.core.decoder.StandardDecoder
All Implemented Interfaces:
ValueDecoder
Direct Known Subclasses:
CascadeDecoder

public class StandardDecoder extends Object implements ValueDecoder
Decoder that is used internally to decode text using implementation of Type.
Author:
przemek hertel
  • Constructor Details

    • StandardDecoder

      public StandardDecoder()
  • Method Details

    • decode

      public ValueHolder decode(String text, Type<?> type, ParamContext ctx)
      decodes given text to specific ValueHolder using type passed as method argument
      Specified by:
      decode in interface ValueDecoder
      Parameters:
      text - contains value to decode, for example:
      • simple text
      • 1234
      • 2018-01-15 09:10:11
      type - implementation of Type that will be used to convert given text
      ctx - implementation of ParamContext, not used here
      Returns:
      specific implementation of ValueHolder containing decoded value
      See Also: