Class SearchLocationContext

java.lang.Object
docking.widgets.search.SearchLocationContext

public class SearchLocationContext extends Object
A class to hold context representation for SearchLocations.
See Also:
  • Field Details

  • Method Details

    • get

      public static SearchLocationContext get(String text)
      A factory method to create a context instance with the given text. The context created this way will have no special HTML formatting applied by getBoldMatchingText(), as no matching parts will be defined.
      Parameters:
      text - the text
      Returns:
      the context
    • get

      public static SearchLocationContext get(SearchLocationContext context)
      A factory method to provided as a convenience to handle null context objects.
      Parameters:
      context - the context to verify is not null
      Returns:
      the given context or the EMPTY_CONTEXT if the given context is null
    • getPlainText

      public String getPlainText()
      The full plain text of this context.
      Returns:
      the text
    • getDebugText

      public String getDebugText()
      Returns text that is helpful for debugging, such as printing to a console.
      Returns:
      the text
    • getBoldMatchingText

      public String getBoldMatchingText()
      Returns HTML text for this context. Any matching items embedded in the returned string will be bold.
      Returns:
      the text
    • getMatches

      public List<String> getMatches()
      Returns any sub-strings of this context's overall text that match client-defined input See the SearchLocationContextBuilder for how to define matching text pieces
      Returns:
      the matching strings
    • toString

      public String toString()
      Overrides:
      toString in class Object