|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.topologi.diffx.util.CommandLine
public final class CommandLine
A set of utility methods to help with command-line interface.
The methods in this class would typically be used in the main(String[])
method of a class.
Method Summary | |
---|---|
static String |
getParameter(String name,
String[] args)
Returns the value corresponding to the given switch. |
static boolean |
hasSwitch(String name,
String[] args)
Return true if the specified switch exists in the arguments. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getParameter(String name, String[] args)
Returns null
if any of the parameters is null
.
name
- The name of the command line switchargs
- The command line arguments
null
.public static boolean hasSwitch(String name, String[] args)
true
if the specified switch exists in the arguments.
This method will go through every argument to check whether the switch exists or not.
Returns false
if any of the parameters is null
.
name
- The name of the command line switch.args
- The command line arguments.
true
if the switch if available; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |