hasAllChildren

abstract fun hasAllChildren(indirectChildren: Boolean = false, predicate: (KoChildDeclaration) -> Boolean): Boolean

Determines whether the declaration has all children defined directly in the Kotlin file that satisfy the provided predicate.

Note that if the children contains no elements, the function returns true because there are no elements in it that do not match the predicate. See a more detailed explanation of this logic concept in "Vacuous truth" article.

Return

true if all child declarations satisfy the predicate, false otherwise.

Parameters

indirectChildren

specifies whether to include children defined in other files such as child of the child.

predicate

A function that defines the condition to be met by child declarations.