A12Pointer

One exact A12 DocumentPointer: an ordered list of A12PathPart, with A12's derived views over it.

The shape is the owner's. DocumentPointer holds List<PathPart> and derives fullName() and repetitionIndexes() from it. This type used to be a pair of parallel names/repetitions lists, which is a shape A12 does not have โ€” the parallel lists appear only as factory arguments there (DocumentPointer.of(fullName, repetitions)), never as the value's state.

Repetition domain, measured against DocumentPointerImpl's constructor: every index >= 1, except the last, which may also be A12PointerFormat.LAST_PART_ZERO to address A12's RepetitionsV2 slot. Nothing negative is representable; a repetition that could not be resolved to a row belongs to A12PartiallyKnownMultiPointer.

Zero parts is legal. That is A12's root pointer: DocumentPointerImpl.parseFullName("") returns an empty part list and the class displays that value as (empty DocumentPointer), a display name no illegal value gets. Rejecting it would invent a shape stricter than A12's.

Construction goes through of, and never through a generated copy(): the parts list is snapshotted, so a data class would be unable to validate-and-snapshot in one step (init cannot reassign a val constructor property) and its copy() would hand back an unchecked value.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val fullName: String

DocumentPointer.fullName() โ€” the names with a leading slash each, so the root pointer renders as "".

Link copied to clipboard

The parts, in order โ€” DocumentPointer.getPathParts(). Immutable and independent of the caller's list.

Link copied to clipboard
val repetitionIndexes: List<Int>

DocumentPointer.repetitionIndexes(). Immutable, like pathParts, rather than a fresh mutable copy.

Link copied to clipboard
val size: Int

DocumentPointer.size().

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun partAtLevel(level: Int): A12PathPart

DocumentPointer.getPartAtLevel(level).

Link copied to clipboard
open override fun toString(): String

DocumentPointerImpl.toString, including its display name for the root pointer.