Package joptsimple.util
Class InetAddressConverter
- java.lang.Object
-
- joptsimple.util.InetAddressConverter
-
- All Implemented Interfaces:
ValueConverter<InetAddress>
public class InetAddressConverter extends Object implements ValueConverter<InetAddress>
Converts values toInetAddressusinggetByName.- Author:
- Raymund Fülöp
-
-
Constructor Summary
Constructors Constructor Description InetAddressConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddressconvert(String value)Converts the given string value into a Java type.StringvaluePattern()Gives a string that describes the pattern of the values this converter expects, if any.Class<InetAddress>valueType()Gives the class of the type of values this converter converts to.
-
-
-
Method Detail
-
convert
public InetAddress convert(String value)
Description copied from interface:ValueConverterConverts the given string value into a Java type.- Specified by:
convertin interfaceValueConverter<InetAddress>- Parameters:
value- the string to convert- Returns:
- the converted value
-
valueType
public Class<InetAddress> valueType()
Description copied from interface:ValueConverterGives the class of the type of values this converter converts to.- Specified by:
valueTypein interfaceValueConverter<InetAddress>- Returns:
- the target class for conversion
-
valuePattern
public String valuePattern()
Description copied from interface:ValueConverterGives a string that describes the pattern of the values this converter expects, if any. For example, a date converter can respond with adate format string.- Specified by:
valuePatternin interfaceValueConverter<InetAddress>- Returns:
- a value pattern, or
nullif there's nothing interesting here
-
-