Interface Highlighter

  • All Known Implementing Classes:
    HtmlHighlighter

    public interface Highlighter
    An interface for highlighting portions of a string.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String highlight​(java.lang.String value, java.util.Collection<java.lang.String> highlights)
      Apply highlighting to a string.
    • Field Detail

      • NOOP_HIGHLIGHTER

        static final Highlighter NOOP_HIGHLIGHTER
        A highlighter that does nothing.
    • Method Detail

      • highlight

        java.lang.String highlight​(java.lang.String value,
                                   java.util.Collection<java.lang.String> highlights)
        Apply highlighting to a string.
        Parameters:
        value - the string to highlight
        highlights - the substrings to highlight within value
        Returns:
        a new string with highlighting