Class IndentationPolicy
java.lang.Object
io.github.wasabithumb.jtoml.option.prop.IndentationPolicy
Determines how a TOML document should be indented
when writing.
Rules
-
indentChar()defines the character used to perform indentation, either SPACE or TAB. -
globalIndent()defines the initial indentation for each line. -
The indentation level is set to
globalIndent()plusconstantIndent()directly before each table declaration, as well as an additionalvariableIndent()for each additional part in the table path. For instance, the declaration[a.b.c]would set the indent level toglobalIndent + constantIndent + 2 * variableIndent. -
The indentation level is incremented by
postIndent()directly after each table declaration.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IndentationPolicyNo indentationstatic final IndentationPolicyindentationLevel is initialized to 0. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull IndentationPolicy.Builderbuilder()@org.jetbrains.annotations.Range(from=0L, to=255L) intboolean@org.jetbrains.annotations.Range(from=0L, to=255L) intinthashCode()char@org.jetbrains.annotations.Range(from=0L, to=255L) int@NotNull StringtoString()@org.jetbrains.annotations.Range(from=0L, to=255L) int
-
Field Details
-
NONE
No indentation -
STANDARD
indentationLevel is initialized to 0. Table headers set indentationLevel tokey.size() - 1. Each line is preceded by "indentationLevel" TAB characters.
-
-
Method Details
-
builder
-
indentChar
public char indentChar() -
globalIndent
public @org.jetbrains.annotations.Range(from=0L, to=255L) int globalIndent() -
constantIndent
public @org.jetbrains.annotations.Range(from=0L, to=255L) int constantIndent() -
variableIndent
public @org.jetbrains.annotations.Range(from=0L, to=255L) int variableIndent() -
postIndent
public @org.jetbrains.annotations.Range(from=0L, to=255L) int postIndent() -
hashCode
public int hashCode() -
equals
-
toString
-