joptsimple.util
Class InetAddressConverter

java.lang.Object
  extended by joptsimple.util.InetAddressConverter
All Implemented Interfaces:
ValueConverter<InetAddress>

public class InetAddressConverter
extends Object
implements ValueConverter<InetAddress>

Converts values to InetAddress using getByName.

Author:
Raymund Fülöp

Constructor Summary
InetAddressConverter()
           
 
Method Summary
 InetAddress convert(String value)
          Converts the given string value into a Java type.
 String valuePattern()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InetAddressConverter

public InetAddressConverter()
Method Detail

convert

public InetAddress convert(String value)
Description copied from interface: ValueConverter
Converts the given string value into a Java type.

Specified by:
convert in interface ValueConverter<InetAddress>
Parameters:
value - the string to convert
Returns:
the converted value

valueType

public Class<InetAddress> valueType()
Description copied from interface: ValueConverter
Gives the class of the type of values this converter converts to.

Specified by:
valueType in interface ValueConverter<InetAddress>
Returns:
the target class for conversion

valuePattern

public String valuePattern()
Description copied from interface: ValueConverter
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.

Specified by:
valuePattern in interface ValueConverter<InetAddress>
Returns:
a value pattern, or null if there's nothing interesting here


Copyright © 2014. All Rights Reserved.