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


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

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


```kotlin
class SemanticsMatcher(val description: String, private val matcher: (SemanticsNode) -> Boolean)
```


Wrapper for semantics matcher lambdas that allows to build string explaining to the developer
what conditions were being tested.


## Functions



<h2 id="matches-node">matches</h2>

```kotlin
fun matches(node: SemanticsNode): Boolean
```


Returns whether the given node is matched by this matcher.




<hr class="docs-overload-divider">


<h2 id="matchesany-nodes">matchesAny</h2>

```kotlin
fun matchesAny(nodes: Iterable<SemanticsNode>): Boolean
```


Returns whether at least one of the given nodes is matched by this matcher.




<hr class="docs-overload-divider">


<h2 id="and-other">and</h2>

```kotlin
infix fun and(other: SemanticsMatcher): SemanticsMatcher
```



<hr class="docs-overload-divider">


<h2 id="or-other">or</h2>

```kotlin
infix fun or(other: SemanticsMatcher): SemanticsMatcher
```



<hr class="docs-overload-divider">


<h2 id="not">not</h2>

```kotlin
operator fun not(): SemanticsMatcher
```

## Companion Object

#### Methods



<hr class="docs-overload-divider">


<h2 id="expectvalue-key-expectedvalue">expectValue</h2>

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


```kotlin
fun <T> expectValue(key: SemanticsPropertyKey<T>, expectedValue: T): SemanticsMatcher
```


Builds a predicate that tests whether the value of the given `key` is equal to
`expectedValue`.





<hr class="docs-overload-divider">


<h2 id="keyisdefined-key">keyIsDefined</h2>

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


```kotlin
fun <T> keyIsDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher
```


Builds a predicate that tests whether the given `key` is defined in semantics.





<hr class="docs-overload-divider">


<h2 id="keynotdefined-key">keyNotDefined</h2>

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


```kotlin
fun <T> keyNotDefined(key: SemanticsPropertyKey<T>): SemanticsMatcher
```


Builds a predicate that tests whether the given `key` is NOT defined in semantics.