---
title: "SemanticsSelector"
description: "Projects the given set of nodes to a new set of nodes."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
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

| | |
| --- | --- |
| description | Description that is displayed to the developer in error outputs. |
| requiresExactlyOneNode | Whether this selector should expect to receive exactly 1 node. |
| chainedInputSelector | Optional selector to apply before this selector gets applied. |
| selector | The lambda that implements the projection. |



## Functions

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


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



