public class CmdlineParameters extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CmdlineParameters.Parameter
Defines one allowed parameter.
|
Modifier and Type | Field and Description |
---|---|
protected CmdlineParameters.Parameter[] |
thePars
The defined parameters.
|
protected Map<String,String[]> |
theValues
The found values.
|
Constructor and Description |
---|
CmdlineParameters(CmdlineParameters.Parameter... pars)
Constructor, list allowed Parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String name)
Has this named parameter been given?
|
String |
get(String name)
Obtain the value of a single-valued parameter.
|
String[] |
getMany(String name)
Obtain the value(s) of a multi-valued parameter
|
String[] |
parse(String[] args)
Parse the command-line arguments.
|
protected CmdlineParameters.Parameter[] thePars
public CmdlineParameters(CmdlineParameters.Parameter... pars)
pars
- the allowed parameterspublic String[] parse(String[] args)
args
- the command-line argumentspublic boolean containsKey(String name)
name
- name of the parameterpublic String get(String name)
name
- name of the parameterCopyright © 2018. All rights reserved.