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
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 single stringinstantiate
(String[] s) instantiates a list of arguments if validboolean
valid iff string matches criteriavoid
setCriteria
(String criteria) void
Methods 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:
getValue
in classStringListCommandParameter
-
getCriteria
-
setValue
- Overrides:
setValue
in classStringListCommandParameter
-
setCriteria
-
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
-