# DataInteraction.DisplayDataMatcher

Artifact: [androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso) [View Source](https://cs.android.com/search?q=file:androidx/test/espresso/DataInteraction.java+class:androidx.test.espresso.DataInteraction.DisplayDataMatcher)

*** ** * ** ***


```
class DataInteraction.DisplayDataMatcher : TypeSafeMatcher<View!>
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [org.hamcrest.BaseMatcher](https://junit.org/junit4/javadoc/latest/org/hamcrest/BaseMatcher.html) |||
|   | ↳ | [org.hamcrest.TypeSafeMatcher](https://junit.org/junit4/javadoc/latest/org/hamcrest/TypeSafeMatcher.html)\<[View](https://developer.android.com/reference/android/view/View.html)!\> ||
|   |   | ↳ | [androidx.test.espresso.DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher) |

*** ** * ** ***

Internal matcher that is required for `https://developer.android.com/reference/kotlin/androidx/test/espresso/Espresso#onData(org.hamcrest.Matcher<? extends java.lang.Object>)`.

This matcher is only visible to support proto serialization. Do not use this matcher in any Espresso test code!

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#describeTo(org.hamcrest.Description)(description: https://junit.org/junit4/javadoc/latest/org/hamcrest/Description.html!)` |
| `java-static https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher!` | `[displayDataMatcher](https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#displayDataMatcher(org.hamcrest.Matcher<android.view.View>,org.hamcrest.Matcher<? extends java.lang.Object>,org.hamcrest.Matcher<androidx.test.espresso.Root>,androidx.test.espresso.util.EspressoOptional<java.lang.Integer>,androidx.test.espresso.action.AdapterViewProtocol))( adapterMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/android/view/View.html!>, dataMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>, rootMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/kotlin/androidx/test/espresso/Root!>, atPosition: https://developer.android.com/reference/kotlin/androidx/test/espresso/util/EspressoOptional<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!, adapterViewProtocol: androidx.test.espresso.action.AdapterViewProtocol )` **This function is deprecated.** use `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#displayDataMatcher(org.hamcrest.Matcher<android.view.View>,org.hamcrest.Matcher<? extends java.lang.Object>,org.hamcrest.Matcher<androidx.test.espresso.Root>,java.lang.Integer,androidx.test.espresso.action.AdapterViewProtocol)` instead. <br /> |
| `java-static https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher!` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#displayDataMatcher(org.hamcrest.Matcher<android.view.View>,org.hamcrest.Matcher<? extends java.lang.Object>,org.hamcrest.Matcher<androidx.test.espresso.Root>,java.lang.Integer,androidx.test.espresso.action.AdapterViewProtocol)( adapterMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/android/view/View.html!>, dataMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>, rootMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/kotlin/androidx/test/espresso/Root!>, atPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?, adapterViewProtocol: androidx.test.espresso.action.AdapterViewProtocol )` Returns an instance of `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#matchesSafely(android.view.View)(view: https://developer.android.com/reference/android/view/View.html!)` |

### Inherited functions

From [org.hamcrest.BaseMatcher](https://junit.org/junit4/javadoc/latest/org/hamcrest/BaseMatcher.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://junit.org/junit4/javadoc/latest/org/hamcrest/BaseMatcher.html#_dont_implement_Matcher___instead_extend_BaseMatcher_--()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://junit.org/junit4/javadoc/latest/org/hamcrest/BaseMatcher.html#toString--()` From [org.hamcrest.TypeSafeMatcher](https://junit.org/junit4/javadoc/latest/org/hamcrest/TypeSafeMatcher.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://junit.org/junit4/javadoc/latest/org/hamcrest/TypeSafeMatcher.html#describeMismatch-java.lang.Object-org.hamcrest.Description-(item: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!, description: https://junit.org/junit4/javadoc/latest/org/hamcrest/Description.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://junit.org/junit4/javadoc/latest/org/hamcrest/TypeSafeMatcher.html#describeMismatchSafely-T-org.hamcrest.Description-(item: T!, mismatchDescription: https://junit.org/junit4/javadoc/latest/org/hamcrest/Description.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://junit.org/junit4/javadoc/latest/org/hamcrest/TypeSafeMatcher.html#matches-java.lang.Object-(item: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)`

## Public functions

### describeTo

```
fun describeTo(description: Description!): Unit
```

### displayDataMatcher

```
java-static fun [displayDataMatcher](https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#displayDataMatcher(org.hamcrest.Matcher<android.view.View>,org.hamcrest.Matcher<? extends java.lang.Object>,org.hamcrest.Matcher<androidx.test.espresso.Root>,androidx.test.espresso.util.EspressoOptional<java.lang.Integer>,androidx.test.espresso.action.AdapterViewProtocol))(
    adapterMatcher: Matcher<View!>,
    dataMatcher: Matcher<Any!>,
    rootMatcher: Matcher<Root!>,
    atPosition: EspressoOptional<Int!>!,
    adapterViewProtocol: androidx.test.espresso.action.AdapterViewProtocol
): DataInteraction.DisplayDataMatcher!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher#displayDataMatcher(org.hamcrest.Matcher<android.view.View>,org.hamcrest.Matcher<? extends java.lang.Object>,org.hamcrest.Matcher<androidx.test.espresso.Root>,java.lang.Integer,androidx.test.espresso.action.AdapterViewProtocol)` instead.

Returns an instance of `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher`.

Note: This is an internal method, do not call from test code!

| Parameters |
|---|---|
| `adapterMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/android/view/View.html!>` | matcher that matches an `https://developer.android.com/reference/android/widget/AdapterView.html` |
| `dataMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>` | the data matcher for matching a `https://developer.android.com/reference/android/view/View.html` by it's adapter data |
| `rootMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/kotlin/androidx/test/espresso/Root!>` | matcher for view's root |
| `atPosition: https://developer.android.com/reference/kotlin/androidx/test/espresso/util/EspressoOptional<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!` | optional position of the view to match |
| `adapterViewProtocol: androidx.test.espresso.action.AdapterViewProtocol` | the used for this data interaction |

### displayDataMatcher

```
java-static fun displayDataMatcher(
    adapterMatcher: Matcher<View!>,
    dataMatcher: Matcher<Any!>,
    rootMatcher: Matcher<Root!>,
    atPosition: Int?,
    adapterViewProtocol: androidx.test.espresso.action.AdapterViewProtocol
): DataInteraction.DisplayDataMatcher!
```

Returns an instance of `https://developer.android.com/reference/kotlin/androidx/test/espresso/DataInteraction.DisplayDataMatcher`.

Note: This is an internal method, do not call from test code!

| Parameters |
|---|---|
| `adapterMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/android/view/View.html!>` | matcher that matches an `https://developer.android.com/reference/android/widget/AdapterView.html` |
| `dataMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>` | the data matcher for matching a `https://developer.android.com/reference/android/view/View.html` by it's adapter data |
| `rootMatcher: https://junit.org/junit4/javadoc/latest/org/hamcrest/Matcher.html<https://developer.android.com/reference/kotlin/androidx/test/espresso/Root!>` | matcher for view's root |
| `atPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?` | optional zero-based position of the data to be matched |
| `adapterViewProtocol: androidx.test.espresso.action.AdapterViewProtocol` | the used for this data interaction |

### matchesSafely

```
fun matchesSafely(view: View!): Boolean
```