org.incava.jagol

Class IntegerOption


public class IntegerOption
extends NonBooleanOption

Represents an option that is an integer.

Field Summary

Fields inherited from class org.incava.jagol.Option

longName, shortName

Constructor Summary

IntegerOption(String longName, String description)
IntegerOption(String longName, String description, Integer value)

Method Summary

protected String
getType()
Returns the option type.
Integer
getValue()
Returns the value.
void
setValue(Integer value)
Sets the value.
void
setValue(String value)
Sets the value from the string, for an integer type.
String
toString()

Methods inherited from class org.incava.jagol.NonBooleanOption

getType, set

Methods inherited from class org.incava.jagol.Option

getDescription, getLongName, getShortName, set, setLongName, setShortName, setValue

Constructor Details

IntegerOption

public IntegerOption(String longName,
                     String description)

IntegerOption

public IntegerOption(String longName,
                     String description,
                     Integer value)

Method Details

getType

protected String getType()
Returns the option type.
Overrides:
getType in interface NonBooleanOption

getValue

public Integer getValue()
Returns the value. This is null if not set.

setValue

public void setValue(Integer value)
Sets the value.

setValue

public void setValue(String value)
            throws InvalidTypeException
Sets the value from the string, for an integer type.
Overrides:
setValue in interface Option

toString

public String toString()