Class OperatorFileWriter.Side
java.lang.Object
com.ultikits.ultitools.config.document.OperatorFileWriter.Side
- Enclosing class:
OperatorFileWriter
One side of the comparison: its document, node tree, lines, nodes by line and owned-line marks.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSide(ConfigDocument document, org.yaml.snakeyaml.nodes.Node tree, List<String> lines) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidmark(int from, int to) (package private) StringmarkComment(List<String> path, int commentLines) Marks thecommentLinesowned comment lines directly above the key atpath.(package private) StringmarkSectionLine(List<String> section, int line) Marks the key line of an expanded section (OperatorFileWriter.EmptySections): only that one line, and only when every node on it is the section's own key or value - so a flow collection or a second key on the line is never owned.(package private) StringMarks the span of the key atpath- key line to the last line of its value, plus thecommentLinesowned comment lines directly above it - and returns a reason when a line of that span also holds a node of a path the write does not own, or the comment is not where it belongs.
-
Field Details
-
document
-
tree
private final org.yaml.snakeyaml.nodes.Node tree -
lines
-
owned
private final boolean[] owned -
nodes
-
-
Constructor Details
-
Side
Side(ConfigDocument document, org.yaml.snakeyaml.nodes.Node tree, List<String> lines)
-
-
Method Details
-
markValue
Marks the span of the key atpath- key line to the last line of its value, plus thecommentLinesowned comment lines directly above it - and returns a reason when a line of that span also holds a node of a path the write does not own, or the comment is not where it belongs. -
markComment
Marks thecommentLinesowned comment lines directly above the key atpath. -
markSectionLine
Marks the key line of an expanded section (OperatorFileWriter.EmptySections): only that one line, and only when every node on it is the section's own key or value - so a flow collection or a second key on the line is never owned. -
mark
private void mark(int from, int to)
-