类 Ansi8BitColor
java.lang.Object
cn.taketoday.core.ansi.Ansi8BitColor
- 所有已实现的接口:
AnsiElement
AnsiElement implementation for ANSI 8-bit foreground or background color codes.- 从以下版本开始:
- 4.0
- 作者:
- Toshiaki Maki, Phillip Webb
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Ansi8BitColorbackground(int code) Return a background ANSI color code instance for the given code.booleanstatic Ansi8BitColorforeground(int code) Return a foreground ANSI color code instance for the given code.inthashCode()toString()
-
字段详细资料
-
prefix
-
code
private final int code
-
-
构造器详细资料
-
Ansi8BitColor
Create a newAnsi8BitColorinstance.- 参数:
prefix- the prefix escape charscode- color code (must be 0-255)- 抛出:
IllegalArgumentException- if color code is not between 0 and 255.
-
-
方法详细资料
-
equals
-
hashCode
public int hashCode() -
toString
- 指定者:
toString在接口中AnsiElement- 覆盖:
toString在类中Object- 返回:
- the ANSI escape code
-
foreground
Return a foreground ANSI color code instance for the given code.- 参数:
code- the color code- 返回:
- an ANSI color code instance
-
background
Return a background ANSI color code instance for the given code.- 参数:
code- the color code- 返回:
- an ANSI color code instance
-