SemanticsSelector


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

Summary

Public constructors

SemanticsSelector(
    description: String,
    requiresExactlyOneNode: Boolean,
    chainedInputSelector: SemanticsSelector?,
    selector: (Iterable<SemanticsNode>) -> SelectionResult
)
Cmn

Public functions

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

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

Cmn

Public properties

String

Description that is displayed to the developer in error outputs.

Cmn

Public constructors

SemanticsSelector

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

Description that is displayed to the developer in error outputs.

requiresExactlyOneNode: Boolean

Whether this selector should expect to receive exactly 1 node.

chainedInputSelector: SemanticsSelector? = null

Optional selector to apply before this selector gets applied.

selector: (Iterable<SemanticsNode>) -> SelectionResult

The lambda that implements the projection.

Public functions

map

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

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

Throws
kotlin.AssertionError

if required prerequisites to perform the selection were not satisfied.

Public properties

description

val descriptionString

Description that is displayed to the developer in error outputs.