Interface SearchBuilder<T>

Type Parameters:
T - the type of items being searched
All Superinterfaces:
BaseBuilder<SearchBuilder<T>>
All Known Implementing Classes:
DefaultSearchBuilder

public interface SearchBuilder<T> extends BaseBuilder<SearchBuilder<T>>
Builder interface for search prompts.

SearchBuilder extends BaseBuilder to provide a consistent fluent API for creating search prompts. The name() and message() methods are inherited from BaseBuilder, ensuring API consistency across all prompt types.

See Also:
  • Method Details

    • searchFunction

      SearchBuilder<T> searchFunction(Function<String,List<T>> searchFunction)
      Set the search function.
      Parameters:
      searchFunction - the function to search items
      Returns:
      this builder
    • displayFunction

      SearchBuilder<T> displayFunction(Function<T,String> displayFunction)
      Set the display function.
      Parameters:
      displayFunction - the function to convert items to display strings
      Returns:
      this builder
    • valueFunction

      SearchBuilder<T> valueFunction(Function<T,String> valueFunction)
      Set the value function.
      Parameters:
      valueFunction - the function to convert items to values
      Returns:
      this builder
    • placeholder

      SearchBuilder<T> placeholder(String placeholder)
      Set the placeholder text.
      Parameters:
      placeholder - the placeholder text
      Returns:
      this builder
    • minSearchLength

      SearchBuilder<T> minSearchLength(int minSearchLength)
      Set the minimum search length.
      Parameters:
      minSearchLength - the minimum number of characters before searching
      Returns:
      this builder
    • maxResults

      SearchBuilder<T> maxResults(int maxResults)
      Set the maximum number of results.
      Parameters:
      maxResults - the maximum results to display
      Returns:
      this builder