Class AnsiColorStringBuilder
java.lang.Object
org.antublue.test.engine.internal.util.AnsiColorStringBuilder
Class to build AnsiColor strings using a fluent pattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(boolean b) Method to append a booleanappend(char c) Method to append a characterappend(char[] chars) Method to append a character arrayappend(char[] chars, int offset, int length) Method to append a character arrayappend(double d) Method to append a doubleappend(float f) Method to append a floatappend(int i) Method to append an intappend(long l) Method to append a longMethod to append an object's toString()Method to append a stringMethod to set the current color.setLength(int length) Method to reset the lengthtoString()
-
Constructor Details
-
AnsiColorStringBuilder
public AnsiColorStringBuilder()Constructor -
AnsiColorStringBuilder
public AnsiColorStringBuilder(int capacity) Constructor- Parameters:
capacity- capacity
-
-
Method Details
-
setLength
Method to reset the length- Parameters:
length- length- Returns:
- this
-
color
Method to set the current color. If the color is null, defaults to AnsiColor.RESET- Parameters:
ansiColor- ansiColor- Returns:
- this
-
append
Method to append a boolean- Parameters:
b- boolean- Returns:
- this
-
append
Method to append a character- Parameters:
c- character- Returns:
- this
-
append
Method to append a character array- Parameters:
chars- character array- Returns:
- this
-
append
Method to append a character array- Parameters:
chars- character arrayoffset- offsetlength- length- Returns:
- this
-
append
Method to append a double- Parameters:
d- double- Returns:
- this
-
append
Method to append a float- Parameters:
f- float- Returns:
- this
-
append
Method to append an int- Parameters:
i- int- Returns:
- this
-
append
Method to append a long- Parameters:
l- long- Returns:
- this
-
append
Method to append a string- Parameters:
string- String- Returns:
- this
-
append
Method to append an object's toString()- Parameters:
object- object- Returns:
- this
-
toString
-