Interface CommandHelp.Suggestion

All Superinterfaces:
CommandHelp
Enclosing interface:
CommandHelp

@Immutable public static non-sealed interface CommandHelp.Suggestion extends CommandHelp
Represents a list of available commands, as suggestions.
  • Method Details

    • of

      static CommandHelp.Suggestion of(String longestSharedPath, List<String> childSuggestions)
      Creates a new command suggestion.
      Parameters:
      longestSharedPath - the longest shared path of the suggestions
      childSuggestions - the child suggestions
    • getLongestSharedPath

      String getLongestSharedPath()
      Returns the longest shared path of the suggestions. This means for the commands a b c and a b d, the longest shared path would be a b.
    • getChildSuggestions

      List<String> getChildSuggestions()
      Returns the child suggestions.