# UriMatchers

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

# UriMatchers

| 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

final

class
UriMatchers
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|----------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.intent.matcher.UriMatchers |

<br />

*** ** * ** ***

A collection of matchers for[Uri](https://developer.android.com/reference/android/net/Uri.html)s, which can match Uris on their properties (host, path, ...).

## Summary

|                                                                                                                                                                                                                                                               ### Public methods                                                                                                                                                                                                                                                                ||
|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasHost](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasHost(org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> hostMatcher) `                                                                                                                                                                                     |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasHost](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasHost(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` host) `                                                                                                                                                                                                                           |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasParamWithName](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasParamWithName(org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> paramName) `                                                                                                                                                                     |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasParamWithName](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasParamWithName(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` paramName) `                                                                                                                                                                                                    |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasParamWithValue](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasParamWithValue(java.lang.String, java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` paramName, `[String](https://developer.android.com/reference/java/lang/String.html)` paramVal) `                                                                                            |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasParamWithValue](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasParamWithValue(org.hamcrest.Matcher<java.lang.String>, org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> paramName, Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> paramVal) `                              |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasPath](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasPath(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` pathName) `                                                                                                                                                                                                                       |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasPath](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasPath(org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> pathName) `                                                                                                                                                                                        |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasScheme](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasScheme(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` scheme) `                                                                                                                                                                                                                     |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasScheme](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasScheme(org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> schemeMatcher) `                                                                                                                                                                               |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasSchemeSpecificPart](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasSchemeSpecificPart(org.hamcrest.Matcher<java.lang.String>, org.hamcrest.Matcher<java.lang.String>))`(Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> schemeMatcher, Matcher<`[String](https://developer.android.com/reference/java/lang/String.html)`> schemeSpecificPartMatcher) ` |
| ` static Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | ` `[hasSchemeSpecificPart](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#hasSchemeSpecificPart(java.lang.String, java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` scheme, `[String](https://developer.android.com/reference/java/lang/String.html)` schemeSpecificPart) `                                                                             |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers#)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() `                                                                                 | ||

## Public methods

### hasHost

```
Matcher<Uri> hasHost (Matcher<String> hostMatcher)
```

<br />

<br />

|           Parameters            ||
|---------------|------------------|
| `hostMatcher` | `Matcher` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasHost

```
Matcher<Uri> hasHost (String host)
```

<br />

<br />

|       Parameters        ||
|--------|-----------------|
| `host` | `String` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasParamWithName

```
Matcher<Uri> hasParamWithName (Matcher<String> paramName)
```

<br />

<br />

|          Parameters           ||
|-------------|------------------|
| `paramName` | `Matcher` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasParamWithName

```
Matcher<Uri> hasParamWithName (String paramName)
```

<br />

<br />

|          Parameters          ||
|-------------|-----------------|
| `paramName` | `String` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasParamWithValue

```
Matcher<Uri> hasParamWithValue (String paramName, 
                String paramVal)
```

<br />

<br />

|          Parameters          ||
|-------------|-----------------|
| `paramName` | `String` <br /> |
| `paramVal`  | `String` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasParamWithValue

```
Matcher<Uri> hasParamWithValue (Matcher<String> paramName, 
                Matcher<String> paramVal)
```

<br />

<br />

|          Parameters           ||
|-------------|------------------|
| `paramName` | `Matcher` <br /> |
| `paramVal`  | `Matcher` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasPath

```
Matcher<Uri> hasPath (String pathName)
```

<br />

<br />

|         Parameters          ||
|------------|-----------------|
| `pathName` | `String` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasPath

```
Matcher<Uri> hasPath (Matcher<String> pathName)
```

<br />

<br />

|          Parameters          ||
|------------|------------------|
| `pathName` | `Matcher` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasScheme

```
Matcher<Uri> hasScheme (String scheme)
```

<br />

<br />

|        Parameters         ||
|----------|-----------------|
| `scheme` | `String` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasScheme

```
Matcher<Uri> hasScheme (Matcher<String> schemeMatcher)
```

<br />

<br />

|            Parameters             ||
|-----------------|------------------|
| `schemeMatcher` | `Matcher` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasSchemeSpecificPart

```
Matcher<Uri> hasSchemeSpecificPart (Matcher<String> schemeMatcher, 
                Matcher<String> schemeSpecificPartMatcher)
```

<br />

<br />

|                  Parameters                   ||
|-----------------------------|------------------|
| `schemeMatcher`             | `Matcher` <br /> |
| `schemeSpecificPartMatcher` | `Matcher` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

### hasSchemeSpecificPart

```
Matcher<Uri> hasSchemeSpecificPart (String scheme, 
                String schemeSpecificPart)
```

<br />

<br />

|              Parameters               ||
|----------------------|-----------------|
| `scheme`             | `String` <br /> |
| `schemeSpecificPart` | `String` <br /> |

|                                         Returns                                          ||
|----------------------------------------------------------------------------------|--------|
| `Matcher<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`>` | <br /> |

-

  ## Classes

  - [BundleMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/BundleMatchers)
  - [ComponentNameMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/ComponentNameMatchers)
  - [IntentMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/IntentMatchers)
  - [UriMatchers](https://developer.android.com/reference/android/support/test/espresso/intent/matcher/UriMatchers)