{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SelectionResult

public final class SelectionResult


Result of SemanticsSelector projection.

Summary

Public constructors

SelectionResult(
    @NonNull List<@NonNull SemanticsNode> selectedNodes,
    String customErrorOnNoMatch
)

Public methods

final String

If the projection failed to map nodes due to wrong input (e.g. selector expected only 1 node but got multiple) it will provide a custom error exactly explaining what selection was performed and what nodes it received.

final @NonNull List<@NonNull SemanticsNode>

The result nodes found.

Public constructors

SelectionResult

public SelectionResult(
    @NonNull List<@NonNull SemanticsNode> selectedNodes,
    String customErrorOnNoMatch
)
Parameters
@NonNull List<@NonNull SemanticsNode> selectedNodes

The result nodes found.

String customErrorOnNoMatch

If the projection failed to map nodes due to wrong input (e.g. selector expected only 1 node but got multiple) it will provide a custom error exactly explaining what selection was performed and what nodes it received.

Public methods

getCustomErrorOnNoMatch

public final String getCustomErrorOnNoMatch()

If the projection failed to map nodes due to wrong input (e.g. selector expected only 1 node but got multiple) it will provide a custom error exactly explaining what selection was performed and what nodes it received.

getSelectedNodes

public final @NonNull List<@NonNull SemanticsNodegetSelectedNodes()

The result nodes found.