Interface CliPrinter

All Known Implementing Classes:
CliPrinter.ConsumerPrinter

public interface CliPrinter
Handles text output of the CLI.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    CliPrinter that calls a Consumer that accepts a CharSequence.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Prints text to the writer and appends a new line.
    default String
    style(String text, Style... styles)
    Styles the given text using ANSI escape sequences.
  • Method Details

    • println

      void println(String text)
      Prints text to the writer and appends a new line.
      Parameters:
      text - Text to print.
    • style

      default String style(String text, Style... styles)
      Styles the given text using ANSI escape sequences.

      It is strongly recommended to use the constants defined in Style to provide valid combinations of ANSI color escape codes.

      Parameters:
      text - Text to style.
      styles - ANSI escape codes.
      Returns:
      Returns the styled text.