Class StringArgumentCommandToken

java.lang.Object
com.symphony.bdk.core.activity.parsing.StringArgumentCommandToken
All Implemented Interfaces:
ArgumentCommandToken, CommandToken, RegexCommandToken

@API(status=INTERNAL) public class StringArgumentCommandToken extends Object implements RegexCommandToken, ArgumentCommandToken
A command token matching a single word and put in a given argument.
  • Field Details

  • Constructor Details

    • StringArgumentCommandToken

      protected StringArgumentCommandToken(String argumentName)
  • Method Details

    • newInstance

      public static StringArgumentCommandToken newInstance(String pattern)
      Creates new instance of ArgumentCommandToken with pattern in the format: "{argName}"
      Parameters:
      pattern - the pattern in the format: "{argName}"
      Returns:
      a new instance of an ArgumentCommandToken
    • getRegexPattern

      public Pattern getRegexPattern()
      Specified by:
      getRegexPattern in interface RegexCommandToken
      Returns:
      the regex pattern the word must follow in order to match.
    • getArgumentName

      public String getArgumentName()
      Specified by:
      getArgumentName in interface ArgumentCommandToken
      Returns:
      the argument name.