APIdia Launch Partner
Top Description Methods
jdk.internal.joptsimple

public Interface ValueConverter<V>

Known Direct Implementers
jdk.internal.joptsimple.internal.ConstructorInvokingValueConverter, jdk.internal.joptsimple.internal.MethodInvokingValueConverter, jdk.internal.joptsimple.util.DateConverter, jdk.internal.joptsimple.util.EnumConverter, jdk.internal.joptsimple.util.InetAddressConverter, jdk.internal.joptsimple.util.PathConverter, jdk.internal.joptsimple.util.RegexMatcher
Type Parameters
<V>
constraint on the type of values being converted to

Instances of this interface are used to convert arguments of options into specific Java types.
Author
Paul Holser

Method Summary

Modifier and TypeMethod and Description
public V

Returns:

the converted value
convert
(String
the string to convert
value
)

Converts the given string value into a Java type.

public String

Returns:

a value pattern, or null if there's nothing interesting here
valuePattern
()

Gives a string that describes the pattern of the values this converter expects, if any.

public Class<? extends V>

Returns:

the target class for conversion
valueType
()

Gives the class of the type of values this converter converts to.

Method Detail

convertback to summary
public V convert(String value)

Converts the given string value into a Java type.

Parameters
value:String

the string to convert

Returns:V

the converted value

Exceptions
ValueConversionException:
if a problem occurs while converting the value
valuePatternback to summary
public 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:String

a value pattern, or null if there's nothing interesting here

valueTypeback to summary
public Class<? extends V> valueType()

Gives the class of the type of values this converter converts to.

Returns:Class<? extends V>

the target class for conversion