Documentation of 'joptsimple.ValueConverter' Java class
ValueConverter
joptsimple

Interface ValueConverter<V>

  • Type Parameters:
    V - constraint on the type of values being converted to
    All Known Implementing Classes:
    DateConverter, RegexMatcher


    public interface ValueConverter<V>
    Instances of this interface are used to convert arguments of options into specific Java types.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      V convert(java.lang.String value)
      Converts the given string value into a Java type.
      java.lang.String valuePattern()
      Gives a string that describes the pattern of the values this converter expects, if any.
      java.lang.Class<V> valueType()
      Gives the class of the type of values this converter converts to.
    • Method Detail

      • convert

        V convert(java.lang.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

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

        java.lang.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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.