public class SelectionCommandParameter extends CommandParameter
| Constructor and Description |
|---|
SelectionCommandParameter(String id,
String des) |
SelectionCommandParameter(String id,
String des,
String[] selections) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
String[] |
getSelections()
returns each possible selection argument
|
String |
getValue()
returns the given instantiation argument value for this parameter
|
ArrayList<CommandParameter> |
instantiate(ArrayList<String> s) |
CommandParameter |
instantiate(String s)
instantiates a new parameter iff the given value ist valid for this
command parameter
|
boolean |
isValid(String s)
checks whether a cli input parameter argument is valid for the called
command parameter
|
void |
setSelections(String[] selections)
sets new selection parameter
|
void |
setValue(String value)
sets the instantiated parameter argument value, value has to be one of
the options contained in selections
|
getDescription, getIdentifierpublic SelectionCommandParameter(String id, String des)
id - des - public String[] getSelections()
public void setSelections(String[] selections)
selections - public String getValue()
public void setValue(String value)
value - the value given as argument valuepublic boolean isValid(String s)
isValid in class CommandParameters - the given input stringpublic CommandParameter instantiate(String s)
instantiate in class CommandParameters - the given argument stringpublic ArrayList<CommandParameter> instantiate(ArrayList<String> s)
Copyright © 2018. All rights reserved.