Interface NoResults

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface NoResults
Functional interface that is responsible for generating a menu item when no results are found in a given menu list for a specific input text.

This interface can be implemented to customize the behavior or appearance of the "no results" menu item.

  • Method Summary

    Modifier and Type
    Method
    Description
    static NoResults
    Provides a default implementation of the NoResults functional interface.
    noResults(MenuList menuList, String text)
    Generates a menu item to be displayed when no results are found in the specified menu list for the given input text.
  • Method Details

    • noResults

      MenuItem noResults(MenuList menuList, String text)
      Generates a menu item to be displayed when no results are found in the specified menu list for the given input text.
      Parameters:
      menuList - The menu list where the search operation was performed.
      text - The input text for which no results were found.
      Returns:
      A menu item representing the "no results" state.
    • noResults

      static NoResults noResults()
      Provides a default implementation of the NoResults functional interface. The returned implementation generates a disabled menu item with a message indicating that no results were found for the provided text.
      Returns:
      A NoResults implementation that creates a disabled menu item with a "no results" message based on the input text.