# UriMatcherCompat

# UriMatcherCompat

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/content/UriMatcherCompat.java+class:androidx.core.content.UriMatcherCompat)  
Added in[1.9.0](https://developer.android.com/jetpack/androidx/releases/core#1.9.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/content/UriMatcherCompat "View this page in Java")

<br />

```
class UriMatcherCompat
```

<br />

*** ** * ** ***

Helper for accessing[UriMatcher](https://developer.android.com/reference/android/content/UriMatcher.html)to create Uri Predicate.

## Summary

|                                                                               ### Public functions                                                                               |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Predicate](https://developer.android.com/reference/kotlin/androidx/core/util/Predicate)`<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`!>` | [asPredicate](https://developer.android.com/reference/kotlin/androidx/core/content/UriMatcherCompat#asPredicate(android.content.UriMatcher))`(matcher: `[UriMatcher](https://developer.android.com/reference/android/content/UriMatcher.html)`)` Creates a Uri predicate from a[UriMatcher](https://developer.android.com/reference/android/content/UriMatcher.html). |

## Public functions

### asPredicate

Added in[1.9.0](https://developer.android.com/jetpack/androidx/releases/core#1.9.0)  

```
java-static fun asPredicate(matcher: UriMatcher): Predicate<Uri!>
```

Creates a Uri predicate from a[UriMatcher](https://developer.android.com/reference/android/content/UriMatcher.html).  

|                                            Parameters                                            |
|--------------------------------------------------------------------------------------------------|-----------------|
| `matcher: `[UriMatcher](https://developer.android.com/reference/android/content/UriMatcher.html) | the uriMatcher. |

|                                                                              Returns                                                                               |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
| [Predicate](https://developer.android.com/reference/kotlin/androidx/core/util/Predicate)`<`[Uri](https://developer.android.com/reference/android/net/Uri.html)`!>` | the predicate created from the uriMatcher. |