Package net.sf.tweety.plugin.parameter
Class StringListCommandParameter
- java.lang.Object
-
- net.sf.tweety.plugin.parameter.CommandParameter
-
- net.sf.tweety.plugin.parameter.StringListCommandParameter
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
CustomStringListCommandParameter
public class StringListCommandParameter extends CommandParameter
This class models a string list command parameter for Work-in-Progress, do not use!- Author:
- bwolf
-
-
Constructor Summary
Constructors Constructor Description StringListCommandParameter(String id, String des)constructor with identifier and description
-
Method Summary
Modifier and Type Method Description Objectclone()method to clone this object for instantiationString[]getValue()CommandParameterinstantiate(String s)instantiates unary argument if validCommandParameterinstantiate(String[] s)instantiates a list of arguments if validbooleanisValid(String s)checks each input string for validityvoidsetValue(String[] value)-
Methods inherited from class net.sf.tweety.plugin.parameter.CommandParameter
getDescription, getIdentifier
-
-
-
-
Method Detail
-
getValue
public String[] getValue()
-
setValue
public void setValue(String[] value)
-
isValid
public boolean isValid(String s)
checks each input string for validity- Specified by:
isValidin classCommandParameter- Parameters:
s- the given input string- Returns:
- true if valid, false if not
-
instantiate
public CommandParameter instantiate(String s)
instantiates unary argument if valid- Specified by:
instantiatein classCommandParameter- Parameters:
s- the given argument string- Returns:
- The CommandParameter instance or null if the given string is not valid.
-
instantiate
public CommandParameter instantiate(String[] s)
instantiates a list of arguments if valid- Parameters:
s- an array of strings- Returns:
- the command parameter
-
-