public class IndentedLinesBuilder extends Object implements CharSequence, Appendable
Important: Do not use outside of Soy code (treat as superpackage-private).
The maximum indent length is 24.
| Constructor and Description |
|---|
IndentedLinesBuilder(int indentIncrementLen)
Constructor with initial indent length of 0.
|
IndentedLinesBuilder(int indentIncrementLen,
int initialIndentLen)
Constructor with a specified initial indent length.
|
| Modifier and Type | Method and Description |
|---|---|
IndentedLinesBuilder |
append(char c) |
IndentedLinesBuilder |
append(CharSequence csq) |
IndentedLinesBuilder |
append(CharSequence csq,
int start,
int end) |
void |
appendLine(Object... parts)
Appends a line.
|
IndentedLinesBuilder |
appendLineEnd(Object... parts)
Appends the given strings, then a newline.
|
IndentedLinesBuilder |
appendLineStart(Object... parts)
Appends the current indent, then the given strings.
|
IndentedLinesBuilder |
appendParts(Object... parts)
Appends some parts to the current line.
|
char |
charAt(int index) |
void |
decreaseIndent()
Decreases the indent by one stop.
|
void |
decreaseIndent(int numStops)
Decreases the indent by the given number of stops.
|
int |
getCurrIndentLen()
Returns the current indent length.
|
int |
getIndentIncrementLen()
Returns the number of spaces between indent stops.
|
void |
increaseIndent()
Increases the indent by one stop.
|
void |
increaseIndent(int numStops)
Increases the indent by the given number of stops.
|
int |
length() |
StringBuilder |
sb()
Gets the internal StringBuilder for this instance.
|
CharSequence |
subSequence(int start,
int end) |
String |
toString()
Returns the current content as a string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic IndentedLinesBuilder(int indentIncrementLen)
indentIncrementLen - The number of spaces between indent stops.public IndentedLinesBuilder(int indentIncrementLen,
int initialIndentLen)
indentIncrementLen - The number of spaces between indent stops.initialIndentLen - The inital indent length.public StringBuilder sb()
public int getIndentIncrementLen()
public int getCurrIndentLen()
public void increaseIndent()
public void increaseIndent(int numStops)
public void decreaseIndent()
public void decreaseIndent(int numStops)
public void appendLine(Object... parts)
parts - The parts that make up the line.public IndentedLinesBuilder appendParts(Object... parts)
parts - The parts to append.public IndentedLinesBuilder appendLineStart(Object... parts)
parts - The parts to append.public IndentedLinesBuilder appendLineEnd(Object... parts)
parts - The parts to append.public String toString()
toString in interface CharSequencetoString in class Objectpublic int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic IndentedLinesBuilder append(CharSequence csq)
append in interface Appendablepublic IndentedLinesBuilder append(CharSequence csq, int start, int end)
append in interface Appendablepublic IndentedLinesBuilder append(char c)
append in interface Appendable