SemanticsSelector

Class

Common
class SemanticsSelector(
    val description: String,
    private val requiresExactlyOneNode: Boolean,
    private val chainedInputSelector: SemanticsSelector? = null,
    private val selector: (Iterable<SemanticsNode>) -> SelectionResult,
)

Projects the given set of nodes to a new set of nodes.

Parameters

descriptionDescription that is displayed to the developer in error outputs.
requiresExactlyOneNodeWhether this selector should expect to receive exactly 1 node.
chainedInputSelectorOptional selector to apply before this selector gets applied.
selectorThe lambda that implements the projection.

Functions

fun map(nodes: Iterable<SemanticsNode>, errorOnFail: String): SelectionResult

Maps the given list of nodes to a new list of nodes.