Class AbstractConverter<C>

    • Constructor Detail

      • AbstractConverter

        public AbstractConverter()
    • Method Detail

      • parse

        protected C parse​(Format format,
                          Object value,
                          Locale locale)
        Parses a value using one of the java.util.text format classes.
        Parameters:
        format - The format to use
        value - The object to parse
        locale - The locale to use to parse.
        Returns:
        The object
        Throws:
        ConversionException - Thrown if parsing fails
      • newConversionException

        protected ConversionException newConversionException​(String message,
                                                             Object value,
                                                             Locale locale)
        Creates a conversion exception for throwing
        Parameters:
        message - The message
        value - The value that didn't convert
        locale - The locale
        Returns:
        The ConversionException
      • getTargetType

        protected abstract Class<C> getTargetType()
        Returns:
        The target type of this type converter