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:
StringListCommandParameter
-
Constructor Summary
ConstructorsConstructorDescriptionCustomStringListCommandParameter(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 instantiationString[]getValue()instantiate(String s)instantiate single stringinstantiate(String[] s)instantiates a list of arguments if validbooleanvalid iff string matches criteriavoidsetCriteria(String criteria)voidMethods inherited from class org.tweetyproject.plugin.parameter.CommandParameter
getDescription, getIdentifier
-
Constructor Details
-
CustomStringListCommandParameter
constructor for the custom string list parameter with id and description- Parameters:
id- the identification string of this parameterdes- the description of this parameter
-
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
- Overrides:
getValuein classStringListCommandParameter
-
getCriteria
-
setValue
- Overrides:
setValuein classStringListCommandParameter
-
setCriteria
-
isValid
valid iff string matches criteria- Overrides:
isValidin classStringListCommandParameter- Parameters:
s- the given input string- Returns:
- true if valid, false if not
-
instantiate
instantiate single string- Overrides:
instantiatein classStringListCommandParameter- Parameters:
s- the given string to instantiate- Returns:
- parameter
-
instantiate
instantiates a list of arguments if valid- Overrides:
instantiatein 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:
clonein classStringListCommandParameter
-