|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.parboiled.common.Reference<T>
org.parboiled.support.Var<java.lang.StringBuilder>
org.parboiled.support.StringBuilderVar
public class StringBuilderVar
Simple specialization of a Var for StringBuilders.
Provides a few convenience helper methods.
| Constructor Summary | |
|---|---|
StringBuilderVar()
Initializes a new StringVar with a null initial value. |
|
StringBuilderVar(java.lang.StringBuilder value)
Initializes a new StringBuilderVar with the given initial StringBuilder instance. |
|
| Method Summary | |
|---|---|
boolean |
append(char c)
Appends the given char. |
boolean |
append(java.lang.String text)
Appends the given string. |
StringBuilderVar |
appended(char c)
Appends the given char. |
StringBuilderVar |
appended(java.lang.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()
|
java.lang.String |
getString()
|
boolean |
isEmpty()
Returns true if the wrapped string is either null or empty. |
| Methods inherited from class org.parboiled.support.Var |
|---|
enterFrame, exitFrame, getLevel, getName, setName, toString |
| Methods inherited from class org.parboiled.common.Reference |
|---|
clear, get, getAndClear, getAndSet, isNotSet, isSet, set, setAndGet |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringBuilderVar()
public StringBuilderVar(java.lang.StringBuilder value)
value - the initial value| Method Detail |
|---|
public boolean isEmpty()
public java.lang.String getString()
public char[] getChars()
public boolean append(java.lang.String text)
text - the text to append
public StringBuilderVar appended(java.lang.String text)
text - the text to append
public boolean append(char c)
c - the char to append
public StringBuilderVar appended(char c)
c - the char to append
public boolean clearContents()
public StringBuilderVar contentsCleared()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||