|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jargp.ParameterDef | +--org.jargp.IntDef
Command line integer parameter definition. This defines a command line flag with an associated integer 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 | |
IntDef(char chr,
java.lang.String name)
Constructor with no range or description. |
|
IntDef(char chr,
java.lang.String name,
int min,
int max)
Constructor with range but no description. |
|
IntDef(char chr,
java.lang.String name,
java.lang.String desc)
Constructor with no range defined. |
|
IntDef(char chr,
java.lang.String name,
java.lang.String desc,
int min,
int 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 IntDef(char chr, java.lang.String name, java.lang.String desc, int min, int max)
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parametermin
- minimum allowed valuemax
- maximum allowed valuepublic IntDef(char chr, java.lang.String name, int min, int max)
chr
- parameter flag charactername
- field name for parametermin
- minimum allowed valuemax
- maximum allowed valuepublic IntDef(char chr, java.lang.String name, java.lang.String desc)
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parameterpublic IntDef(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 |