TopologyProblem

data class TopologyProblem(val path: List<Int>, val names: List<String>, val kind: TopologyProblem.Kind, val detail: String)

One thing wrong with a topology, addressed so a config page can show it beside the right line.

The address is path: the child indices from the root down to the node the problem concerns, counted from zero in the order written. [] is the root itself and [0, 2] is the third child of the root's first child. Indices are unique among siblings, so two children with the same name, or with no name at all, still have different addresses, and a child literally named #3 or a/b can never be mistaken for an index or for two levels.

A problem about a child's name or weight and a problem about that same child as a group (an empty group, a bad weight in its template) share its path; problems at one path are told apart by kind and detail.

Constructors

Link copied to clipboard
constructor(path: List<Int>, names: List<String>, kind: TopologyProblem.Kind, detail: String)

Types

Link copied to clipboard

The kinds of problem a topology can have: the kinds Topology.from finds, and CONSUMER for the app's own.

Properties

Link copied to clipboard

a sentence for a person, naming the offending text.

Link copied to clipboard

what kind of problem this is.

Link copied to clipboard

the names along path for display, starting with the root's, so it always holds one more entry than path. A name may be "" or repeat a sibling's: use path, never names, to identify the node.

Link copied to clipboard
val path: List<Int>

the child indices from the root to the node this problem concerns; [] is the root. Every index is >= 0.