get

operator fun KpaList.get(pointer: KPointer): KpaElement?(source)

Returns the KpaElement at the path identified by pointer, or null if the index is out of range — an absent element, consistent with KpaStruct.get returning null for an absent key.

Returns the receiver if pointer is the root pointer.

Throws IllegalStateException if a segment addressing this list is not a non-negative integer, or if an intermediate segment lands on a KpaPrimitive.

Return

The KpaElement at the specified path, this if pointer is the root pointer, or null if the index is out of range.

Receiver

The KpaList to traverse.

Parameters

pointer

The KPointer identifying the value to retrieve.


operator fun KpaStruct.get(pointer: KPointer): KpaElement?(source)

Returns the KpaElement at the path identified by pointer, or null if a key along the path is absent. Returns the receiver if pointer is the root pointer.

Throws IllegalStateException if an intermediate segment lands on a KpaPrimitive.

Return

The KpaElement at the specified path, or null if a key along the path is absent.

Receiver

The KpaStruct to traverse.

Parameters

pointer

The KPointer identifying the value to retrieve.