org.globus.cog.gridshell.getopt.app
Class ArgumentImpl

java.lang.Object
  extended byorg.globus.cog.gridshell.getopt.app.StorableImpl
      extended byorg.globus.cog.gridshell.getopt.app.ArgumentImpl
All Implemented Interfaces:
Argument, Storable

public class ArgumentImpl
extends StorableImpl
implements Argument

An Implemenation of Argument


Constructor Summary
ArgumentImpl(String description, Class type)
           
ArgumentImpl(String description, Class type, boolean isRequired)
           
ArgumentImpl(String description, Class type, boolean isRequired, Object defaultValue)
           
ArgumentImpl(String description, Class type, boolean isRequired, Object defaultValue, Option optionThatOverrides)
           
ArgumentImpl(String description, Class type, Option optionThatOverrides)
           
 
Method Summary
 Option getOptionThatOverrides()
          Arguments can have options that override them, this returns the option that overrides the need/value for this argument
 Object getValue()
          Returns the value based upon the validator associated with this type
 boolean isSet()
          Sees if this is set to non-null and not FALSE
 String toString()
           
 
Methods inherited from class org.globus.cog.gridshell.getopt.app.StorableImpl
getDescription, getType, getValidators, isRequired, resetDefaultValidators, setValidator, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.globus.cog.gridshell.getopt.interfaces.Storable
getDescription, getType, isRequired, setValue
 

Constructor Detail

ArgumentImpl

public ArgumentImpl(String description,
                    Class type,
                    boolean isRequired,
                    Object defaultValue,
                    Option optionThatOverrides)

ArgumentImpl

public ArgumentImpl(String description,
                    Class type,
                    boolean isRequired,
                    Object defaultValue)

ArgumentImpl

public ArgumentImpl(String description,
                    Class type,
                    boolean isRequired)

ArgumentImpl

public ArgumentImpl(String description,
                    Class type,
                    Option optionThatOverrides)

ArgumentImpl

public ArgumentImpl(String description,
                    Class type)
Method Detail

getOptionThatOverrides

public Option getOptionThatOverrides()
Description copied from interface: Argument
Arguments can have options that override them, this returns the option that overrides the need/value for this argument

Specified by:
getOptionThatOverrides in interface Argument
Returns:

getValue

public Object getValue()
Description copied from interface: Storable
Returns the value based upon the validator associated with this type

Specified by:
getValue in interface Storable
Overrides:
getValue in class StorableImpl

isSet

public boolean isSet()
Description copied from interface: Storable
Sees if this is set to non-null and not FALSE

Specified by:
isSet in interface Storable
Overrides:
isSet in class StorableImpl

toString

public String toString()
Overrides:
toString in class StorableImpl