Class CompositeHighlighter.Builder

java.lang.Object
org.daiitech.naftah.utils.repl.CompositeHighlighter.Builder
Enclosing class:
CompositeHighlighter

public static class CompositeHighlighter.Builder extends Object
Builder class for creating a CompositeHighlighter instance using a fluent interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<org.jline.reader.Highlighter>
    List of highlighters to add to the composite.
    private final org.jline.reader.Highlighter
    The original highlighter.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Builder(org.jline.reader.Highlighter originalHighlighter)
    Creates a new Builder with the specified original highlighter.
  • Method Summary

    Modifier and Type
    Method
    Description
    add(org.jline.reader.Highlighter highlighter)
    Adds a highlighter to the composite.
    Builds the CompositeHighlighter with the specified highlighters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • originalHighlighter

      private final org.jline.reader.Highlighter originalHighlighter
      The original highlighter.
    • highlighters

      private final List<org.jline.reader.Highlighter> highlighters
      List of highlighters to add to the composite.
  • Constructor Details

    • Builder

      public Builder(org.jline.reader.Highlighter originalHighlighter)
      Creates a new Builder with the specified original highlighter.
      Parameters:
      originalHighlighter - the base highlighter
  • Method Details

    • add

      public CompositeHighlighter.Builder add(org.jline.reader.Highlighter highlighter)
      Adds a highlighter to the composite.
      Parameters:
      highlighter - the highlighter to add
      Returns:
      this builder instance
    • build

      public CompositeHighlighter build()
      Builds the CompositeHighlighter with the specified highlighters.
      Returns:
      a new CompositeHighlighter instance