|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.util.OptionProcessor.Option
protected class OptionProcessor.Option
Main Option placeholder.
Field Summary | |
---|---|
protected boolean |
bHasArgument
A flag is set to true if the option
has its argument set. |
protected boolean |
bRequiresArgument
A flag is set to true if the option
has a mandatory argument. |
protected int |
iOptionEnum
Internal container for integer equivalent; default is UNDEF. |
protected java.lang.String |
strOptionArgument
Internal container for option argument; default is " |
protected java.lang.String |
strOptionName
Internal container for option name; default is "UNDEFINED". |
Constructor Summary | |
---|---|
OptionProcessor.Option(java.lang.Integer poOption,
java.lang.String pstrOption)
Vanilla integer/string option constructor. |
|
OptionProcessor.Option(int piOption,
java.lang.String pstrOption)
Vanilla integer/string option constructor. |
|
OptionProcessor.Option(int piOption,
java.lang.String pstrOption,
boolean pbRequiresArgument)
Integer/string option constructor with required argument indication. |
|
OptionProcessor.Option(int piOption,
java.lang.String pstrOption,
java.lang.String pstrRequiredArgument)
Integer/string option constructor with required argument. |
Method Summary | |
---|---|
java.lang.String |
getOptionArgument()
Retrieves the option argument string. |
int |
getOptionEnumeration()
Retrieves the option number. |
java.lang.String |
getOptionName()
Retrieves the option name. |
boolean |
hasArgument()
Tells if this option has an argument set. |
boolean |
requiresArgument()
Tells if this option requires an argument. |
void |
requiresArgument(boolean pbRequiresArgument)
Allows to specify whether this option requires an argument or not. |
void |
setOptionArgument(java.lang.String pstrOptionArgument)
Allows setting the option argument. |
void |
setOptionEnumeration(int piOptionEnum)
Allows setting the option number. |
void |
setStrOptionName(java.lang.String pstrOptionName)
Allows setting the option name. |
java.lang.String |
toString()
String representation of the option. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String strOptionName
protected java.lang.String strOptionArgument
protected int iOptionEnum
OptionProcessor.UNDEF
protected boolean bRequiresArgument
true
if the option
has a mandatory argument.
protected boolean bHasArgument
true
if the option
has its argument set.
Constructor Detail |
---|
public OptionProcessor.Option(int piOption, java.lang.String pstrOption)
Option(piOption, pstrOption, false)
.
piOption
- integer option equivalentpstrOption
- String option equivalentpublic OptionProcessor.Option(java.lang.Integer poOption, java.lang.String pstrOption)
Option(piOption, pstrOption, false)
.
poOption
- integer option equivalentpstrOption
- String option equivalentpublic OptionProcessor.Option(int piOption, java.lang.String pstrOption, boolean pbRequiresArgument)
piOption
- integer option equivalentpstrOption
- String option equivalentpbRequiresArgument
- true
if option requires an argumentpublic OptionProcessor.Option(int piOption, java.lang.String pstrOption, java.lang.String pstrRequiredArgument)
piOption
- integer option equivalentpstrOption
- String option equivalentpstrRequiredArgument
- the option argumentMethod Detail |
---|
public boolean requiresArgument()
true
if the argument is requiredpublic void requiresArgument(boolean pbRequiresArgument)
pbRequiresArgument
- true
if the argument is requiredpublic boolean hasArgument()
true
if the argument is setpublic int getOptionEnumeration()
public void setOptionEnumeration(int piOptionEnum)
piOptionEnum
- the option number to setpublic java.lang.String getOptionArgument()
public void setOptionArgument(java.lang.String pstrOptionArgument)
pstrOptionArgument
- the option argument to set.public java.lang.String getOptionName()
public void setStrOptionName(java.lang.String pstrOptionName)
pstrOptionName
- the option name to setpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |