isNodeAtAs

inline fun <N : Node> isNodeAtAs(index: Int): Boolean

Returns true if the child at index is a node of type N.

Return

true if the child is a node of type N, false otherwise

Parameters

N

The expected node type

index

The zero-based index of the child


inline fun <N : Node> isNodeAtAs(index: Int, noinline predicate: (node: N) -> Boolean): Boolean

Returns true if the child at index is a node of type N that satisfies the predicate.

Return

true if the child is a node of type N and satisfies the predicate, false otherwise

Parameters

N

The expected node type

index

The zero-based index of the child

predicate

A function that tests the node