contains

operator fun YamlElement.contains(pointer: KPointer): Boolean(source)

Returns whether the path identified by pointer resolves to a value within this element.

Distinguishes "absent" from "present and net.mamoe.yamlkt.YamlNull": a path whose value is net.mamoe.yamlkt.YamlNull returns true.

Return

true if the path resolves to a value (including net.mamoe.yamlkt.YamlNull); false if any segment is absent or out of bounds, or if the path attempts to navigate into a primitive.

Parameters

pointer

The KPointer to test.