Class ValuePath
java.lang.Object
com.darkcollective.relix.value.internal.ValuePath
Null-propagating navigation into nested
Values — the runtime engine
behind path access like user.name or items[0].price.
Navigation is optional-chaining: a missing field, an
out-of-range index, or a step into a value of the wrong shape yields
NullValue, never an error. This lets heterogeneous, schemaless documents
be queried without crashing — matching Mongo / jq semantics.
The path syntax accepted by parse(String) is dotted field names with
bracketed array indices: "a.b[0].c", "[2].name". This is the
utility's own syntax; the query language's surface syntax for paths is a
separate concern wired in later.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA single navigation step: into a named struct field, or an array index. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueParsespathand navigatesrootthrough it.static Valuenavigate(Value root, List<ValuePath.Step> steps) static List<ValuePath.Step> Parses a path string into navigation steps.
-
Method Details
-
parse
Parses a path string into navigation steps.- Parameters:
path- a path like"a.b[0].c"; empty/blank yields no steps- Returns:
- the ordered steps
- Throws:
IllegalArgumentException- if a[is unterminated or an index is not an integer