Class CustomStringListCommandParameter
java.lang.Object
org.tweetyproject.plugin.parameter.CommandParameter
org.tweetyproject.plugin.parameter.StringListCommandParameter
org.tweetyproject.plugin.parameter.CustomStringListCommandParameter
- All Implemented Interfaces:
Cloneable
This class extends the string list command parameter with functionality
to define valid strings with regular expressions.
- Author:
- Bastian Wolf
- See Also:
-
Constructor Summary
ConstructorDescriptionCustomStringListCommandParameter
(String id, String des) constructor for the custom string list parameter with id and descriptionCustomStringListCommandParameter
(String id, String des, String criteria) constructor for the custom string list parameter with id, description and criteria -
Method Summary
Modifier and TypeMethodDescriptionclone()
method to clone this object for instantiationGetter of criteriaString[]
getValue()
Getter of valueinstantiate single stringinstantiate
(String[] s) instantiates a list of arguments if validboolean
valid iff string matches criteriavoid
setCriteria
(String criteria) Sets the criteria for this object.void
Sets the value of this object.Methods inherited from class org.tweetyproject.plugin.parameter.CommandParameter
getDescription, getIdentifier
-
Constructor Details
-
CustomStringListCommandParameter
-
CustomStringListCommandParameter
constructor for the custom string list parameter with id, description and criteria- Parameters:
id
- the identification string of this parameterdes
- the description of this parametercriteria
- the validation criteria for this parameter
-
-
Method Details
-
getValue
Getter of value- Overrides:
getValue
in classStringListCommandParameter
- Returns:
- value
-
getCriteria
-
setValue
Sets the value of this object.- Overrides:
setValue
in classStringListCommandParameter
- Parameters:
value
- a `String[]` representing the new value to be stored in this object.
-
setCriteria
Sets the criteria for this object.- Parameters:
criteria
- a `String` representing the criteria to be set for this object.
-
isValid
valid iff string matches criteria- Overrides:
isValid
in classStringListCommandParameter
- Parameters:
s
- the given input string- Returns:
- true if valid, false if not
-
instantiate
instantiate single string- Overrides:
instantiate
in classStringListCommandParameter
- Parameters:
s
- the given string to instantiate- Returns:
- parameter
-
instantiate
instantiates a list of arguments if valid- Overrides:
instantiate
in classStringListCommandParameter
- Parameters:
s
- the given strings array to instantiate- Returns:
- instantiated parameter if input is valid,
-
clone
method to clone this object for instantiation- Overrides:
clone
in classStringListCommandParameter
-