|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.text.ArgumentParser.Result
public static class ArgumentParser.Result
A collection of the options and parameters parsed from an array of arguments.
| Constructor Summary | |
|---|---|
ArgumentParser.Result(java.util.Map<java.lang.String,java.lang.Iterable<java.lang.String>> options,
java.lang.Iterable<java.lang.String> params)
|
|
| Method Summary | |
|---|---|
Pair<java.lang.String,java.lang.String> |
getBinaryOption(java.lang.String opt)
Get the 2 arguments associated with the given option, or null if it is undefined
or has a different number of arguments. |
java.lang.Iterable<java.lang.String> |
getOption(java.lang.String opt)
Get the arguments associated with the given option, or null if it is undefined. |
Quad<java.lang.String,java.lang.String,java.lang.String,java.lang.String> |
getQuaternaryOption(java.lang.String opt)
Get the 4 arguments associated with the given option, or null if it is undefined
or has a different number of arguments. |
Triple<java.lang.String,java.lang.String,java.lang.String> |
getTernaryOption(java.lang.String opt)
Get the 3 arguments associated with the given option, or null if it is undefined
or has a different number of arguments. |
java.lang.String |
getUnaryOption(java.lang.String opt)
Get the single argument associated with the given option, or null if it is undefined
or has a different number of arguments. |
boolean |
hasNullaryOption(java.lang.String opt)
Test whether the given option was defined with 0 arguments. |
boolean |
hasOption(java.lang.String opt)
Test whether the given option was defined (or was given a default value). |
java.lang.Iterable<java.lang.String> |
params()
Get the parameters (non-option strings associated with no option) that were parsed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArgumentParser.Result(java.util.Map<java.lang.String,java.lang.Iterable<java.lang.String>> options,
java.lang.Iterable<java.lang.String> params)
| Method Detail |
|---|
public java.lang.Iterable<java.lang.String> params()
public boolean hasOption(java.lang.String opt)
public java.lang.Iterable<java.lang.String> getOption(java.lang.String opt)
null if it is undefined.
opt - The option name, excluding the "-" prefix.public boolean hasNullaryOption(java.lang.String opt)
opt - The option name, excluding the "-" prefix.public java.lang.String getUnaryOption(java.lang.String opt)
null if it is undefined
or has a different number of arguments.
opt - The option name, excluding the "-" prefix.public Pair<java.lang.String,java.lang.String> getBinaryOption(java.lang.String opt)
null if it is undefined
or has a different number of arguments.
opt - The option name, excluding the "-" prefix.public Triple<java.lang.String,java.lang.String,java.lang.String> getTernaryOption(java.lang.String opt)
null if it is undefined
or has a different number of arguments.
opt - The option name, excluding the "-" prefix.public Quad<java.lang.String,java.lang.String,java.lang.String,java.lang.String> getQuaternaryOption(java.lang.String opt)
null if it is undefined
or has a different number of arguments.
opt - The option name, excluding the "-" prefix.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||