| java.lang.Object org.jargp.ParameterDef org.jargp.FloatDef
FloatDef | public class FloatDef extends ParameterDef (Code) | | Command line float parameter definition. This defines a command line flag
with an associated float value. The optionally signed value must
immediately follow the flag character within the same argument string.
author: Dennis M. Sosnoski version: 1.0 |
Constructor Summary | |
public | FloatDef(char chr, String name, String desc, float min, float max) Constructor with range and description. | public | FloatDef(char chr, String name, float min, float max) Constructor with range but no description. | public | FloatDef(char chr, String name, String desc) Constructor with no range defined. | public | FloatDef(char chr, String name) Constructor with no range or description. |
FloatDef | public FloatDef(char chr, String name, String desc, float min, float max)(Code) | | Constructor with range and description.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: desc - discription text for parameter Parameters: min - minimum allowed value Parameters: max - maximum allowed value |
FloatDef | public FloatDef(char chr, String name, float min, float max)(Code) | | Constructor with range but no description.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: min - minimum allowed value Parameters: max - maximum allowed value |
FloatDef | public FloatDef(char chr, String name, String desc)(Code) | | Constructor with no range defined.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: desc - discription text for parameter |
FloatDef | public FloatDef(char chr, String name)(Code) | | Constructor with no range or description.
Parameters: chr - parameter flag character Parameters: name - field name for parameter |
bindToClass | protected void bindToClass(Class clas)(Code) | | Bind parameter to target class field.
Parameters: clas - target class for saving parameter values throws: IllegalArgumentException - if the field is not an int |
getAbbreviation | public String getAbbreviation()(Code) | | Get text abbreviation for parameter. This override of the base class
method returns "-cNN", where 'c' is the flag character for the parameter.
text abbreviation for showing parameter |
handle | public void handle(ArgumentProcessor proc)(Code) | | Handle argument. This implementation of the abstract base class method
interprets the characters following the flag character as an optionally
signed decimal value. If the value is within the allowed range the
parameter is set to that value. Other flag characters may follow the
numeric value within the argument.
Parameters: proc - argument processor making call to handler throws: ArgumentErrorException - if decimal value missing or out of range throws: IllegalArgumentException - on error in processing |
|
|