HasParentNode

An object that can have a parent node.

Inheritors

Functions

Link copied to clipboard
open fun <N> findAncestor(types: Array<Class<N>>): Optional<N>
Walks the parents of this node and returns the first node of type type, or empty() if none is found.
open fun <N> findAncestor(type: Class<N>, predicate: Predicate<N>): Optional<N>
Walks the parents of this node and returns the first node of type type that matches predicate, or empty() if none is found.
open fun <N> findAncestor(predicate: Predicate<N>, types: Array<Class<N>>): Optional<N>
Walks the parents of this node and returns the first node that matches one of types types, or empty() if none is found.
Link copied to clipboard
abstract fun getParentNode(): Optional<Node>
Returns the parent node, or Optional.empty if no parent is set.
Link copied to clipboard
Returns the parent node from the perspective of the children of this node.
Link copied to clipboard
Returns true if the parent has a parent
Link copied to clipboard
open fun isDescendantOf(ancestor: Node): Boolean
Determines whether this HasParentNode node is a descendant of the given node.
Link copied to clipboard
abstract fun isRegistered(observer: AstObserver): Boolean
Was this observer registered?
Link copied to clipboard
abstract fun register(observer: AstObserver)
Register an observer.
Link copied to clipboard
abstract fun setParentNode(parentNode: Node): T
Sets the parent node.
Link copied to clipboard
abstract fun unregister(observer: AstObserver)
Unregister an observer.