public final class ColorString extends Object
StringBuilder-like class with a fluent API for adding content
colored via ColorMarkers. You may call toString() to get the
current value and then continue adding content to this object. This class is
thread-safe.| Constructor and Description |
|---|
ColorString()
Constructor.
|
public ColorString aqua(String append)
ColorMarker.AQUA, then calls
StringBuilder.append(String).append - the string to append.public ColorString black(String append)
ColorMarker.BLACK, then calls
StringBuilder.append(String).append - the string to append.public ColorString blue(String append)
ColorMarker.BLUE, then calls
StringBuilder.append(String).append - the string to append.public ColorString darkAqua(String append)
ColorMarker.DARK_AQUA, then calls
StringBuilder.append(String).append - the string to append.public ColorString darkBlue(String append)
ColorMarker.DARK_BLUE, then calls
StringBuilder.append(String).append - the string to append.public ColorString darkGray(String append)
ColorMarker.DARK_GRAY, then calls
StringBuilder.append(String).append - the string to append.public ColorString darkGreen(String append)
ColorMarker.DARK_GREEN, then calls
StringBuilder.append(String).append - the string to append.public ColorString darkRed(String append)
ColorMarker.DARK_RED, then calls
StringBuilder.append(String).append - the string to append.public ColorString gold(String append)
ColorMarker.GOLD, then calls
StringBuilder.append(String).append - the string to append.public ColorString gray(String append)
ColorMarker.GRAY, then calls
StringBuilder.append(String).append - the string to append.public ColorString green(String append)
ColorMarker.GREEN, then calls
StringBuilder.append(String).append - the string to append.public ColorString none(String append)
StringBuilder.append(String).append - the string to append.public ColorString pink(String append)
ColorMarker.LIGHT_PURPLE, then calls
StringBuilder.append(String).append - the string to append.public ColorString purple(String append)
ColorMarker.DARK_PURPLE, then calls
StringBuilder.append(String).append - the string to append.public ColorString red(String append)
ColorMarker.RED, then calls
StringBuilder.append(String).append - the string to append.public String toString()
public String toString(ColorMarker color)
color - the desired color suffix. Null is coerced to
ColorMarker.NONE, which resets all formatting at the
current position.toString() if the color is null.public ColorString white(String append)
ColorMarker.WHITE, then calls
StringBuilder.append(String).append - the string to append.public ColorString yellow(String append)
ColorMarker.YELLOW, then calls
StringBuilder.append(String).append - the string to append.Copyright © 2017. All rights reserved.