Class StringListCommandParameter

java.lang.Object
org.tweetyproject.plugin.parameter.CommandParameter
org.tweetyproject.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 Details

    • StringListCommandParameter

      public StringListCommandParameter(String id, String des)
      constructor with identifier and description
      Parameters:
      id - the identifier used to call this parameter
      des - the description of this parameter
  • Method Details

    • getValue

      public String[] getValue()
    • setValue

      public void setValue(String[] value)
    • isValid

      public boolean isValid(String s)
      checks each input string for validity
      Specified by:
      isValid in class CommandParameter
      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:
      instantiate in class CommandParameter
      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
    • clone

      public Object clone()
      method to clone this object for instantiation