public class StringBuilderVar extends Var<StringBuilder>
Var for StringBuilders.
Provides a few convenience helper methods.| Constructor and Description |
|---|
StringBuilderVar()
Initializes a new StringVar with a null initial value.
|
StringBuilderVar(StringBuilder value)
Initializes a new StringBuilderVar with the given initial StringBuilder instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
append(char c)
Appends the given char.
|
boolean |
append(String text)
Appends the given string.
|
StringBuilderVar |
appended(char c)
Appends the given char.
|
StringBuilderVar |
appended(String text)
Appends the given string.
|
boolean |
clearContents()
Clears the contents of the wrapped StringBuilder.
|
StringBuilderVar |
contentsCleared()
Clears the contents of the wrapped StringBuilder.
|
char[] |
getChars() |
String |
getString() |
boolean |
isEmpty()
Returns true if the wrapped string is either null or empty.
|
enterFrame, exitFrame, getLevel, getName, setName, toStringpublic StringBuilderVar()
public StringBuilderVar(StringBuilder value)
value - the initial valuepublic boolean isEmpty()
public String getString()
public char[] getChars()
public boolean append(String text)
text - the text to appendpublic StringBuilderVar appended(String text)
text - the text to appendpublic boolean append(char c)
c - the char to appendpublic StringBuilderVar appended(char c)
c - the char to appendpublic boolean clearContents()
public StringBuilderVar contentsCleared()