|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectml.options.OptionData
public class OptionData
This class holds all the data for an option. This includes the prefix, the key, the separator
(for value options), the multiplicity, and all the other settings describing the option. The class
is designed to be only a data container from a user perspective, i. e. the user has read-access to
any data determined by the Options.check()
, but not access to any of the other methods
which are used internally for the operation of the actual check.
Method Summary | |
---|---|
int |
getResultCount()
Get the number of results found for this option, which is number of times the key matched |
String |
getResultDetail(int index)
Get the detail with the given index. |
String |
getResultValue(int index)
Get the value with the given index. |
String |
toString()
This is the overloaded Object.toString() method, and it is provided mainly for debugging
purposes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getResultCount()
public String getResultValue(int index)
getResultCount()
- 1
.
However, only for value options, a non-null
value will be returned. Non-value options always
return null
.
index
- The index for the desired value
IllegalArgumentException
- If the value for index
is out of boundspublic String getResultDetail(int index)
getResultCount()
- 1
.
However, only for value options which take details, a non-null
detail will be returned. Non-value options
and value options which do not take details always return null
.
index
- The index for the desired value
IllegalArgumentException
- If the value for index
is out of boundspublic String toString()
Object.toString()
method, and it is provided mainly for debugging
purposes.
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |