arlut.csd.Util
Class ParseArgs

java.lang.Object
  |
  +--arlut.csd.Util.ParseArgs

public class ParseArgs
extends java.lang.Object


Constructor Summary
private ParseArgs()
           
 
Method Summary
static java.lang.String getArg(java.lang.String argument, java.lang.String[] args)
          Get the value of an argument Arguments should use this form: argument=value.
static boolean switchExists(java.lang.String argument, java.lang.String[] args)
          Check for to see if an argument exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseArgs

private ParseArgs()
Method Detail

switchExists

public static boolean switchExists(java.lang.String argument,
                                   java.lang.String[] args)
Check for to see if an argument exists. All command line switches must start with a dash. (-)

Parameters:
argument - The string to look for. If the string doesn't start with a dash(-), one will be prepended.
args - The command line arguments passed to tbe main method.

getArg

public static java.lang.String getArg(java.lang.String argument,
                                      java.lang.String[] args)
Get the value of an argument Arguments should use this form: argument=value.

Parameters:
argument - The part of the argument before the equals sign.
args - The comand line arguments passed to the main method.
Returns:
The String after the equals sign(the value).