|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jargp.ParameterDef | +--org.jargp.FloatDef
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.
Field Summary |
Fields inherited from class org.jargp.ParameterDef |
m_char, m_description, m_field, m_name |
Constructor Summary | |
FloatDef(char chr,
java.lang.String name)
Constructor with no range or description. |
|
FloatDef(char chr,
java.lang.String name,
float min,
float max)
Constructor with range but no description. |
|
FloatDef(char chr,
java.lang.String name,
java.lang.String desc)
Constructor with no range defined. |
|
FloatDef(char chr,
java.lang.String name,
java.lang.String desc,
float min,
float max)
Constructor with range and description. |
Method Summary | |
protected void |
bindToClass(java.lang.Class clas)
Bind parameter to target class field. |
java.lang.String |
getAbbreviation()
Get text abbreviation for parameter. |
void |
handle(ArgumentProcessor proc)
Handle argument. |
Methods inherited from class org.jargp.ParameterDef |
getDescription, getFlag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FloatDef(char chr, java.lang.String name, java.lang.String desc, float min, float max)
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parametermin
- minimum allowed valuemax
- maximum allowed valuepublic FloatDef(char chr, java.lang.String name, float min, float max)
chr
- parameter flag charactername
- field name for parametermin
- minimum allowed valuemax
- maximum allowed valuepublic FloatDef(char chr, java.lang.String name, java.lang.String desc)
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parameterpublic FloatDef(char chr, java.lang.String name)
chr
- parameter flag charactername
- field name for parameterMethod Detail |
public java.lang.String getAbbreviation()
getAbbreviation
in class ParameterDef
protected void bindToClass(java.lang.Class clas)
bindToClass
in class ParameterDef
clas
- target class for saving parameter values
java.lang.IllegalArgumentException
- if the field is not an intpublic void handle(ArgumentProcessor proc)
handle
in class ParameterDef
proc
- argument processor making call to handler
ArgumentErrorException
- if decimal value missing or out of range
java.lang.IllegalArgumentException
- on error in processing
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |