Class AnsiFormat

java.lang.Object
com.diogonunes.jcolor.AnsiFormat

public class AnsiFormat extends Object
Abstracts an Array of Attributes. Use it if you find this more readable than Attribute[].
  • Constructor Details

    • AnsiFormat

      public AnsiFormat(Attribute... attributes)
      Parameters:
      attributes - All ANSI attributes to format a text.
  • Method Details

    • format

      public String format(String text)
      Parameters:
      text - String to format.
      Returns:
      The formatted string, ready to be printed.
    • toArray

      protected Attribute[] toArray()