Class StringListCommandParameter

    • Constructor Detail

      • 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 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:
        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
        Overrides:
        clone in class Object