public final class AppArguments
extends java.lang.Object
CGeneralConstant.CLA_ARMED1
, false
CGeneralConstant.CLA_TAB
, 0
CGeneralConstant.CLA_INITDELAY
, 15
CGeneralConstant.CLA_MODE
, "BETRIEB"
CGeneralConstant.CLA_LOG
, "INFO"Constructor and Description |
---|
AppArguments() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(java.lang.String arg)
Returns if one of the internal list contains the argument as a key value.
|
static INumber |
getNumber(java.lang.String arg)
Request the command line argument name which returns, if the argument
exists the corresponding value.
|
static INumber |
getNumber(java.lang.String arg,
java.lang.Class<? extends INumber> clazz)
Request the command line argument and looks if the declared class request
the correct type of
INumber . |
static java.lang.String |
getString(java.lang.String arg)
Request the command line interface with the argument name.
|
static void |
list(java.io.PrintStream stream)
Prints all arguments (numeric and string values to the printer stream.
|
static void |
load(java.lang.String... args)
Loads all arguments into the internal list.
|
static void |
load(java.lang.String args)
Loads all arguments as one string value into the internal list.
|
static void |
setNumber(java.lang.String arg,
INumber value)
Sets the current number with the argument of a key.
|
static void |
setString(java.lang.String arg,
java.lang.String value)
Sets the current string with the argument of a key.
|
public static void load(java.lang.String args)
arg
- String value with all command line arguments.public static void load(java.lang.String... args)
Loads all arguments into the internal list. Depending on the argument list the set values reflects the following conversions (remember that the list of arguments is BEFORE split by a space character from ONE string instance):
Check if the argument contains the equal sign ('='). If yes split the string value and do the following checking on the second argument:
TRUE
.TRUE
or ON
⇒
return a boolean value of TRUE
.FALSE
or OFF
⇒
return a boolean value of FALSE
.TRUE
is set to the key value.args
- List of all string arguments from the command line.public static void list(java.io.PrintStream stream)
null
it will print to the console output
stream.stream
- The printer output stream.public static boolean contains(java.lang.String arg)
true
otherwise a false
is returned.public static INumber getNumber(java.lang.String arg)
false
is supplied (data type of DBoolean
).
The request key argument is queried in upper case.arg
- The key argument.public static INumber getNumber(java.lang.String arg, java.lang.Class<? extends INumber> clazz)
INumber
. If it exists and the type is reflected
by the argument, then the responding value is returned otherwise a warning
is logged and a boolean value of false
is supplied (data type of
DBoolean
). The request key argument is queried in upper case.arg
- The key argument.clazz
- Class data type of the request argument.public static void setNumber(java.lang.String arg, INumber value)
arg
- The key string argument.value
- The corresponding value parameter.public static java.lang.String getString(java.lang.String arg)
String
is returned otherwise a warning
is printed and a null
is supplied. The request key value is
queried in upper case.arg
- The String key argument.public static void setString(java.lang.String arg, java.lang.String value)
arg
- The key string argument.value
- The corresponding value parameter.14-September-2016 18:23 Deutsches Elektronen-Synchrotron DESY in der Helmholtz-Gemeinschaft