PathSegment

sealed class PathSegment(source)

Single segment in a Path.

Each subclass represents a different type of segment that can appear in a path, and links to the high-level factory to obtain an instance of this path.

The high-level operators are only available in correct contexts to disambiguate multiple usages of the same operator. Subclasses of this type do not protect against these usages.

Inheritors

Types

Link copied to clipboard

Path segment for the "all positional" operator (.$[].).

Link copied to clipboard
data class Field(val name: String) : PathSegment

Path segment representing the name of a field.

Link copied to clipboard
data class Indexed(val index: Int) : PathSegment

Path segment representing an indexed element in an array.

Link copied to clipboard
data object Positional : PathSegment

Path segment for the "positional" operator (.$.).