public class Args
extends java.lang.Object
Constructor and Description |
---|
Args() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getopt(java.lang.String[] args,
java.lang.String opt)
Given command line arguments as an array of strings, get the value
for an optional argument, null if it's not there.
|
static java.lang.String |
getopt(java.lang.String[] args,
java.lang.String opt,
java.lang.String def)
Given command line arguments as an array of strings, get the value
for an optional argument, and a default value if it is not there.
|
static boolean |
gettrig(java.lang.String[] args,
java.lang.String trig)
Return true of false depending on whether the given argument
is present or not.
|
public static boolean gettrig(java.lang.String[] args, java.lang.String trig)
args
- the arguments.trig
- the argument to be looked for.public static java.lang.String getopt(java.lang.String[] args, java.lang.String opt)
args
- the arguments.opt
- the optional argument to be retrieved.null
if the argument is not present.public static java.lang.String getopt(java.lang.String[] args, java.lang.String opt, java.lang.String def)
args
- the arguments.opt
- the optional argument to be retrieved.def
- the default value.