# DataInteraction.DisplayDataMatcher

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#)  

# DataInteraction.DisplayDataMatcher

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static
final

class
DataInteraction.DisplayDataMatcher
`  
`


``


``

extends TypeSafeMatcher<`[View](https://developer.android.com/reference/android/view/View.html)`>


``


`

|---|---|---|------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | org.hamcrest.BaseMatcher\<[android.view.View](https://developer.android.com/reference/android/view/View.html)\> |||
|   | ↳ | org.hamcrest.TypeSafeMatcher\<[android.view.View](https://developer.android.com/reference/android/view/View.html)\> ||
|   |   | ↳ | android.support.test.espresso.DataInteraction.DisplayDataMatcher |

<br />

*** ** * ** ***

Internal matcher that is required for[onData(Matcher)](https://developer.android.com/reference/android/support/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 methods                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                                                                  | ` `[describeTo](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#describeTo(org.hamcrest.Description))`(Description description) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ` static `[DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher) | ` `[displayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#displayDataMatcher(org.hamcrest.Matcher<android.view.View>, org.hamcrest.Matcher<? extends java.lang.Object>, org.hamcrest.Matcher<android.support.test.espresso.Root>, android.support.test.espresso.util.EspressoOptional<java.lang.Integer>, android.support.test.espresso.action.AdapterViewProtocol))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> adapterMatcher, Matcher<? extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`> dataMatcher, Matcher<`[Root](https://developer.android.com/reference/android/support/test/espresso/Root)`> rootMatcher, `[EspressoOptional](https://developer.android.com/reference/android/support/test/espresso/util/EspressoOptional)`<`[Integer](https://developer.android.com/reference/java/lang/Integer.html)`> atPosition, `[AdapterViewProtocol](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol)` adapterViewProtocol) ` Returns an instance of[DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher). |
| ` boolean`                                                                                                                                               | ` `[matchesSafely](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#matchesSafely(android.view.View))`(`[View](https://developer.android.com/reference/android/view/View.html)` view) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#)From class` org.hamcrest.TypeSafeMatcher ` |---------------------|-----------------------------------------------------------------------------------------------------------------------------| | ` final void`       | ` describeMismatch(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0, Description arg1) `      | | ` void`             | ` describeMismatchSafely(`[View](https://developer.android.com/reference/android/view/View.html)` arg0, Description arg1) ` | | ` final boolean`    | ` matches(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) `                                 | | ` abstract boolean` | ` matchesSafely(`[View](https://developer.android.com/reference/android/view/View.html)` arg0) `                            | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#)From class` org.hamcrest.BaseMatcher ` |----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| | ` final void`                                                              | ` _dont_implement_Matcher___instead_extend_BaseMatcher_() `                                                            | | ` void`                                                                    | ` describeMismatch(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0, Description arg1) ` | | ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` toString() `                                                                                                         | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#)From interface` org.hamcrest.Matcher ` |---------------------|------------------------------------------------------------------------------------------------------------------------| | ` abstract void`    | ` _dont_implement_Matcher___instead_extend_BaseMatcher_() `                                                            | | ` abstract void`    | ` describeMismatch(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0, Description arg1) ` | | ` abstract boolean` | ` matches(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) `                            | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher#)From interface` org.hamcrest.SelfDescribing ` |------------------|----------------------------------| | ` abstract void` | ` describeTo(Description arg0) ` | ||

## Public methods

### describeTo

```
void describeTo (Description description)
```

<br />

<br />

|             Parameters              ||
|---------------|----------------------|
| `description` | `Description` <br /> |

### displayDataMatcher

```
DataInteraction.DisplayDataMatcher displayDataMatcher (Matcher<View> adapterMatcher, 
                Matcher<? extends Object> dataMatcher, 
                Matcher<Root> rootMatcher, 
                EspressoOptional<Integer> atPosition, 
                AdapterViewProtocol adapterViewProtocol)
```

Returns an instance of[DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher).

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

<br />

|                                                                                                  Parameters                                                                                                   ||
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `adapterMatcher`      | `Matcher`: matcher that matches an[AdapterView](https://developer.android.com/reference/android/widget/AdapterView.html) <br />                                                        |
| `dataMatcher`         | `Matcher`: the data matcher for matching a[View](https://developer.android.com/reference/android/view/View.html)by it's adapter data <br />                                            |
| `rootMatcher`         | `Matcher` <br />                                                                                                                                                                       |
| `atPosition`          | `EspressoOptional` <br />                                                                                                                                                              |
| `adapterViewProtocol` | `AdapterViewProtocol`: the[AdapterViewProtocol](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol)used for this data interaction <br /> |

|                                                                        Returns                                                                         ||
|------------------------------------------------------------------------------------------------------------------------------------------------|--------|
| [DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher) | <br /> |

### matchesSafely

```
boolean matchesSafely (View view)
```

<br />

<br />

|      Parameters       ||
|--------|---------------|
| `view` | `View` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

-

  ## Interfaces

  - [EspressoException](https://developer.android.com/reference/android/support/test/espresso/EspressoException)
  - [FailureHandler](https://developer.android.com/reference/android/support/test/espresso/FailureHandler)
  - [IdlingResource](https://developer.android.com/reference/android/support/test/espresso/IdlingResource)
  - [IdlingResource.ResourceCallback](https://developer.android.com/reference/android/support/test/espresso/IdlingResource.ResourceCallback)
  - [UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)
  - [ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)
  - [ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)
  - [ViewFinder](https://developer.android.com/reference/android/support/test/espresso/ViewFinder)
  - [ViewInteractionComponent](https://developer.android.com/reference/android/support/test/espresso/ViewInteractionComponent)
-

  ## Classes

  - [AmbiguousViewMatcherException.Builder](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException.Builder)
  - [DataInteraction](https://developer.android.com/reference/android/support/test/espresso/DataInteraction)
  - [DataInteraction.DisplayDataMatcher](https://developer.android.com/reference/android/support/test/espresso/DataInteraction.DisplayDataMatcher)
  - [Espresso](https://developer.android.com/reference/android/support/test/espresso/Espresso)
  - [IdlingPolicies](https://developer.android.com/reference/android/support/test/espresso/IdlingPolicies)
  - [IdlingPolicy](https://developer.android.com/reference/android/support/test/espresso/IdlingPolicy)
  - [IdlingRegistry](https://developer.android.com/reference/android/support/test/espresso/IdlingRegistry)
  - [NoMatchingViewException.Builder](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException.Builder)
  - [PerformException.Builder](https://developer.android.com/reference/android/support/test/espresso/PerformException.Builder)
  - [Root](https://developer.android.com/reference/android/support/test/espresso/Root)
  - [Root.Builder](https://developer.android.com/reference/android/support/test/espresso/Root.Builder)
  - [ViewInteraction](https://developer.android.com/reference/android/support/test/espresso/ViewInteraction)
-

  ## Exceptions

  - [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException)
  - [AppNotIdleException](https://developer.android.com/reference/android/support/test/espresso/AppNotIdleException)
  - [IdlingResourceTimeoutException](https://developer.android.com/reference/android/support/test/espresso/IdlingResourceTimeoutException)
  - [InjectEventSecurityException](https://developer.android.com/reference/android/support/test/espresso/InjectEventSecurityException)
  - [NoActivityResumedException](https://developer.android.com/reference/android/support/test/espresso/NoActivityResumedException)
  - [NoMatchingRootException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingRootException)
  - [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)
  - [PerformException](https://developer.android.com/reference/android/support/test/espresso/PerformException)