Interface ListPrompt

All Superinterfaces:
Prompt
All Known Implementing Classes:
DefaultListPrompt

public interface ListPrompt extends Prompt
Interface for list prompts. A list prompt allows the user to select a single item from a list.
  • Method Details

    • getItems

      List<ListItem> getItems()
      Get the list of list items.
      Returns:
      the list of list items
    • getPageSize

      default int getPageSize()
      Get the page size for pagination. If 0 or negative, all items are shown without pagination.
      Returns:
      the page size, or 0 for no pagination
    • showPageIndicator

      default boolean showPageIndicator()
      Whether to show a loop indicator when pagination is enabled. If true, shows "(1/3)" style indicators.
      Returns:
      true to show page indicators, false to hide
    • isFilterable

      default boolean isFilterable()
      Whether the list supports inline text filtering. When enabled, the user can type characters to filter the displayed items. When disabled, typed characters are ignored.
      Returns:
      true if filtering is enabled, false otherwise