org.incava.jagol
Class IntegerOption

java.lang.Object
  extended by org.incava.jagol.Option
      extended by org.incava.jagol.NonBooleanOption
          extended by org.incava.jagol.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(java.lang.String longName, java.lang.String description)
           
IntegerOption(java.lang.String longName, java.lang.String description, java.lang.Integer value)
           
 
Method Summary
protected  java.lang.String getType()
          Returns the option type.
 java.lang.Integer getValue()
          Returns the value.
 void setValue(java.lang.Integer value)
          Sets the value.
 void setValue(java.lang.String value)
          Sets the value from the string, for an integer type.
 java.lang.String toString()
           
 
Methods inherited from class org.incava.jagol.NonBooleanOption
set
 
Methods inherited from class org.incava.jagol.Option
getDescription, getLongName, getShortName, setLongName, setShortName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerOption

public IntegerOption(java.lang.String longName,
                     java.lang.String description)

IntegerOption

public IntegerOption(java.lang.String longName,
                     java.lang.String description,
                     java.lang.Integer value)
Method Detail

getValue

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


setValue

public void setValue(java.lang.Integer value)
Sets the value.


setValue

public void setValue(java.lang.String value)
              throws InvalidTypeException
Sets the value from the string, for an integer type.

Specified by:
setValue in class Option
Throws:
InvalidTypeException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getType

protected java.lang.String getType()
Description copied from class: NonBooleanOption
Returns the option type.

Specified by:
getType in class NonBooleanOption