Package com.topologi.diffx.util
Class CommandLine
java.lang.Object
com.topologi.diffx.util.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.
- Version:
- 17 May 2005
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CommandLine
private CommandLine()Prevents creation of instances.
-
-
Method Details
-
getParameter
Returns the value corresponding to the given switch.Returns
nullif any of the parameters isnull.- Parameters:
name- The name of the command line switchargs- The command line arguments- Returns:
- The value of the parameter or
null.
-
hasSwitch
Returntrueif the specified switch exists in the arguments.This method will go through every argument to check whether the switch exists or not.
Returns
falseif any of the parameters isnull.- Parameters:
name- The name of the command line switch.args- The command line arguments.- Returns:
trueif the switch if available;falseotherwise.
-