类 Ansi8BitColor

java.lang.Object
cn.taketoday.core.ansi.Ansi8BitColor
所有已实现的接口:
AnsiElement

public final class Ansi8BitColor extends Object implements AnsiElement
AnsiElement implementation for ANSI 8-bit foreground or background color codes.
从以下版本开始:
4.0
作者:
Toshiaki Maki, Phillip Webb
另请参阅:
  • 字段详细资料

    • prefix

      private final String prefix
    • code

      private final int code
  • 构造器详细资料

    • Ansi8BitColor

      private Ansi8BitColor(String prefix, int code)
      Create a new Ansi8BitColor instance.
      参数:
      prefix - the prefix escape chars
      code - color code (must be 0-255)
      抛出:
      IllegalArgumentException - if color code is not between 0 and 255.
  • 方法详细资料

    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      指定者:
      toString 在接口中 AnsiElement
      覆盖:
      toString 在类中 Object
      返回:
      the ANSI escape code
    • foreground

      public static Ansi8BitColor foreground(int code)
      Return a foreground ANSI color code instance for the given code.
      参数:
      code - the color code
      返回:
      an ANSI color code instance
    • background

      public static Ansi8BitColor background(int code)
      Return a background ANSI color code instance for the given code.
      参数:
      code - the color code
      返回:
      an ANSI color code instance