public class ArgumentParser
extends java.lang.Object
| Constructor and Description |
|---|
ArgumentParser(java.lang.String args)
Constructs new instance with the specified argument line.
|
ArgumentParser(java.lang.String[] args)
Constructs new instance with the specified array of arguments.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getArgs() |
java.lang.String |
getArgValue(java.lang.String argName,
java.lang.String defaultValue)
Extracts the value for the specified argument.
|
boolean |
isArgPresent(java.lang.String argName)
Tests if an argument name is present.
|
java.lang.String |
toString() |
public ArgumentParser(java.lang.String[] args)
args - the array of argumentspublic ArgumentParser(java.lang.String args)
args - the argument linepublic java.lang.String getArgValue(java.lang.String argName,
java.lang.String defaultValue)
argName - the arguement to extract the value fordefaultValue - value returned if argument name not foundpublic boolean isArgPresent(java.lang.String argName)
argName - the argument name to search forpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String[] getArgs()