- All Superinterfaces:
Prompt
- All Known Implementing Classes:
DefaultSearchPrompt
Interface for search prompts.
A search prompt allows users to search through a list of items dynamically.
-
Method Summary
Modifier and TypeMethodDescriptionGet the function to convert items to display strings.default intGet the maximum number of results to display.default intGet the minimum number of characters required before searching.default StringGet the placeholder text to show when no search term is entered.Get the search function that filters items based on the search term.Get the function to convert items to their values.Methods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
Method Details
-
getSearchFunction
Get the search function that filters items based on the search term.- Returns:
- the search function
-
getDisplayFunction
Get the function to convert items to display strings.- Returns:
- the display function
-
getValueFunction
Get the function to convert items to their values.- Returns:
- the value function
-
getPlaceholder
Get the placeholder text to show when no search term is entered.- Returns:
- the placeholder text
-
getMinSearchLength
default int getMinSearchLength()Get the minimum number of characters required before searching.- Returns:
- the minimum search length
-
getMaxResults
default int getMaxResults()Get the maximum number of results to display.- Returns:
- the maximum results, or -1 for unlimited
-