All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oplan.util.Parameters

java.lang.Object
   |
   +----oplan.util.Parameters

public abstract class Parameters
extends Object
The Parameters class contains methods that allow information from application command-line arguments and from Applet parameters to be used in a uniform way. The class cannot be instantiated.

See Also:
Properties, System

Variable Index

 o parameters

Constructor Index

 o Parameters()

Method Index

 o allParametersWereUsed()
 o bogusParameter(String, String, String)
 o checkParameterUse()
 o complain(String, String)
 o getBoolean(String)
 o getBoolean(String, boolean)
 o getInt(String)
 o getInt(String, int)
 o getParameter(String)
 o getParameter(String, String)
 o getParameters()
 o haveParameter(String)
 o loadParameters(String)
 o processCommandLineArguments(String[])
Parse a String[] of command-line arguments.
 o setParameter(String, String)

Variables

 o parameters
 private static Parameters. AccessRecordingProperties parameters

Constructors

 o Parameters
 public Parameters()

Methods

 o setParameter
 public static void setParameter(String pname,
                                 String value)
 o getParameters
 public static Properties getParameters()
 o getParameter
 public static String getParameter(String pname)
 o getParameter
 public static String getParameter(String pname,
                                   String defaultValue)
 o haveParameter
 public static boolean haveParameter(String pname)
 o getInt
 public static int getInt(String pname)
 o getInt
 public static int getInt(String pname,
                          int defaultValue)
 o getBoolean
 public static boolean getBoolean(String pname)
 o getBoolean
 public static boolean getBoolean(String pname,
                                  boolean defaultValue)
 o bogusParameter
 private static RuntimeException bogusParameter(String type,
                                                String pname,
                                                String value)
 o checkParameterUse
 public static void checkParameterUse()
 o allParametersWereUsed
 public static boolean allParametersWereUsed()
 o processCommandLineArguments
 public static void processCommandLineArguments(String argv[])
Parse a String[] of command-line arguments. The syntax of an argument is -name=value. The value assigned to a name can the be obtained as a String by calling getParameter("name"). Other get-methods can return values of other types.

If no value is given, the value is the empty string "". For getBoolean(name), this is equivalent to "true".

The syntax -not name, or -no name, is equivalent to -name=false.

The syntax -load filename can be used to read parameter values from a file. The file should contain lines in name=value syntax.

 o complain
 private static void complain(String pname,
                              String message)
 o loadParameters
 public static void loadParameters(String filename)

All Packages  Class Hierarchy  This Package  Previous  Next  Index