Interface Segment
- All Known Implementing Classes:
Segment.Child, Segment.Descendant
A segment: it applies its selectors to the children or descendants of a node (RFC 9535, Section 2.5).
For each input node, a segment concatenates the results of its selectors in their order. The segment result is the concatenation of these results, in the order of the input nodes.
| Segment | Query text | Applies its selectors to |
|---|---|---|
Segment.Child |
[0, 'a'], .a, .* |
the input node |
Segment.Descendant |
..[0, 'a'], ..a, ..* |
the input node and all its descendants, in pre-order |
For example, on {"a": {"a": 1}}, the query $..a selects {"a": 1} and then 1.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA child segment:[<selectors>],.name, or.*(Section 2.5.1).static final recordA descendant segment:..[<selectors>],..name, or..*(Section 2.5.2). -
Method Summary
-
Method Details
-
selectors
-