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:
java.lang.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(java.lang.String id, java.lang.String des)
constructor with identifier and description
-
Method Summary
Modifier and Type Method Description java.lang.Object
clone()
method to clone this object for instantiationjava.lang.String[]
getValue()
CommandParameter
instantiate(java.lang.String s)
instantiates unary argument if validCommandParameter
instantiate(java.lang.String[] s)
instantiates a list of arguments if validboolean
isValid(java.lang.String s)
checks each input string for validityvoid
setValue(java.lang.String[] value)
-
Methods inherited from class net.sf.tweety.plugin.parameter.CommandParameter
getDescription, getIdentifier
-
-
-
-
Method Detail
-
getValue
public java.lang.String[] getValue()
-
setValue
public void setValue(java.lang.String[] value)
-
isValid
public boolean isValid(java.lang.String s)
checks each input string for validity- Specified by:
isValid
in classCommandParameter
- Parameters:
s
- the given input string- Returns:
- true if valid, false if not
-
instantiate
public CommandParameter instantiate(java.lang.String s)
instantiates unary argument if valid- Specified by:
instantiate
in classCommandParameter
- Parameters:
s
- the given argument string- Returns:
- The CommandParameter instance or null if the given string is not valid.
-
instantiate
public CommandParameter instantiate(java.lang.String[] s)
instantiates a list of arguments if valid- Parameters:
s
- an array of strings- Returns:
- the command parameter
-
clone
public java.lang.Object clone()
method to clone this object for instantiation
-
-