Class OwnedPaths.Builder
java.lang.Object
com.ultikits.ultitools.config.document.OwnedPaths.Builder
- Enclosing class:
OwnedPaths
Collects owned paths; each path is copied, so later changes to the caller's list do not leak in.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidbuild()Builds the immutable description.Owns the comment lines directly above the key atpath.frameworkComment(List<String> path, int linesInFile) Owns only the lastlinesInFilecomment lines directly above the key atpath- the run the framework identified as its own comment in the file as read (0 when the key has no comment) - and the lines that replace them.Owns the whole key atpath: its value and, when it is inserted or removed, its comment.
-
Field Details
-
values
-
comments
-
commentRuns
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
value
Owns the whole key atpath: its value and, when it is inserted or removed, its comment.- Parameters:
path- the key path, at least one key- Returns:
- this builder
-
comment
Owns the comment lines directly above the key atpath.- Parameters:
path- the key path, at least one key- Returns:
- this builder
-
frameworkComment
Owns only the lastlinesInFilecomment lines directly above the key atpath- the run the framework identified as its own comment in the file as read (0 when the key has no comment) - and the lines that replace them. Every comment line above that run is not owned, so the gate refuses a write that changes one of them (maintainer decision 2026-10-04, "only the framework's own comments are rewritten").- Parameters:
path- the key path, at least one keylinesInFile- the length of the owned run in the file as read, at least 0- Returns:
- this builder
-
build
Builds the immutable description.- Returns:
- the owned paths
-
add
-