Top Description Constructors Methods
joptsimple.util

public Class InetAddressConverter

extends Object
implements ValueConverter<InetAddress>
Class Inheritance
All Implemented Interfaces
joptsimple.ValueConverter
Imports
java.net.InetAddress, .UnknownHostException, java.util.Locale, joptsimple.ValueConversionException, .ValueConverter, joptsimple.internal.Messages

Converts values to java.net.InetAddress using getByName.
Author
Raymund Fülöp

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public InetAddress
convert(String
the string to convert
value
)

Implements joptsimple.ValueConverter.convert.

Converts the given string value into a Java type.
private String
message(String value)

public String
valuePattern()

Implements joptsimple.ValueConverter.valuePattern.

Gives a string that describes the pattern of the values this converter expects, if any.
public Class<InetAddress>
valueType()

Implements joptsimple.ValueConverter.valueType.

Gives the class of the type of values this converter converts to.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InetAddressConverterback to summary
public InetAddressConverter()

Method Detail

convertback to summary
public InetAddress convert(String value)

Implements joptsimple.ValueConverter.convert.

Doc from joptsimple.ValueConverter.convert.

Converts the given string value into a Java type.

Parameters
value:String

the string to convert

Returns:InetAddress

the converted value

messageback to summary
private String message(String value)
valuePatternback to summary
public String valuePattern()

Implements joptsimple.ValueConverter.valuePattern.

Doc from joptsimple.ValueConverter.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<InetAddress> valueType()

Implements joptsimple.ValueConverter.valueType.

Doc from joptsimple.ValueConverter.valueType.

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

Returns:Class<InetAddress>

the target class for conversion