Interface ActionInput


public interface ActionInput
The input for the ActionBuilder
  • Field Details

    • PATTERN

      static final Pattern PATTERN
      The pattern to parse the input from the string. The format is: <type>(<option>): <value>. Note that the <option> and <value> are optional. Also, the allowed characters of the <type> are alphanumeric, _, - and $. To get the <type>, <option> and <value>, use Matcher.group(int) with the index 1, 3 and 5 respectively.
  • Method Details

    • create

      static ActionInput create(String type, String option, String value)
      Create an instance of ActionInput
      Parameters:
      type - the type
      option - the option
      value - the value
      Returns:
      the instance
    • create

      static ActionInput create(String input)
      Create an instance of ActionInput from the input. It will use the PATTERN to parse the input. If the input doesn't match the pattern, it will use the input as the value.
      Parameters:
      input - the input
      Returns:
      the instance
      See Also:
    • getType

      String getType()
      Get the type
      Returns:
      the type
    • getOption

      String getOption()
      Get the option
      Returns:
      the option
    • getValue

      String getValue()
      Get the value
      Returns:
      the value
    • getOptionStream

      default Stream<String> getOptionStream(String separator)
      Get the option as a stream
      Parameters:
      separator - the separator
      Returns:
      the list
    • getOptionStream

      default Stream<String> getOptionStream()
      Get the option as a stream. The format is value,value
      Returns:
      the list
      See Also:
    • getOptionAsList

      default List<String> getOptionAsList(String separator)
      Get the option as a list
      Parameters:
      separator - the separator
      Returns:
      the list
      See Also:
    • getOptionAsList

      default List<String> getOptionAsList()
      Get the option as a list. The format is value,value
      Returns:
      the list
      See Also:
    • getOptionAsMap

      default Map<String,String> getOptionAsMap(String separator)
      Get the option as a map. The map format is key=value
      Parameters:
      separator - the separator
      Returns:
      the map
      See Also:
    • getOptionAsMap

      default Map<String,String> getOptionAsMap()
      Get the option as a map. The format is key=value,key=value
      Returns:
      the map
      See Also: