java.lang.Object
com.telenav.kivakit.core.string.IndentingStringBuilder
Builds a string with indentation levels. The constructor
IndentingStringBuilder(Style, Indentation)
takes
the number of spaces per indentation level. Strings can be added to the builder with appendLine(String)
and
appendLines(String)
. When indent()
is called the indentation level is increased and when unindent()
is called the indentation level is decreased. The indentation level can be retrieved with indentationLevel()
and isIndented()
, and it can be set with level(int)
.- Author:
- jonathanl (shibo)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
-
Constructor Summary
ConstructorsConstructorDescriptionIndentingStringBuilder
(IndentingStringBuilder.Indentation indentation) IndentingStringBuilder
(IndentingStringBuilder.Style style, IndentingStringBuilder.Indentation indentation) -
Method Summary
Modifier and TypeMethodDescriptionappendLine
(String value) appendLines
(String value) boolean
containsLine
(String line) static IndentingStringBuilder
indent()
int
boolean
level
(int level) lines()
numbered()
toString()
unindent()
-
Constructor Details
-
IndentingStringBuilder
public IndentingStringBuilder()
-
-
Method Details