Package joptsimple

Interface ValueConverter<V>

    • Method Detail

      • convert

        V convert​(String value)
        Converts the given string value into a Java type.
        Parameters:
        value - the string to convert
        Returns:
        the converted value
        Throws:
        ValueConversionException - if a problem occurs while converting the value
      • valueType

        Class<? extends V> valueType()
        Gives the class of the type of values this converter converts to.
        Returns:
        the target class for conversion
      • valuePattern

        String valuePattern()
        Gives a string that describes the pattern of the values this converter expects, if any. For example, a date converter can respond with a date format string.
        Returns:
        a value pattern, or null if there's nothing interesting here