# 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)

*** ** * ** ***


```
public class UriMatcherCompat
```

<br />

*** ** * ** ***

Helper for accessing `https://developer.android.com/reference/android/content/UriMatcher.html` to create Uri Predicate.

## Summary

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/util/Predicate<https://developer.android.com/reference/android/net/Uri.html>` | `https://developer.android.com/reference/androidx/core/content/UriMatcherCompat#asPredicate(android.content.UriMatcher)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/UriMatcher.html matcher)` Creates a Uri predicate from a `https://developer.android.com/reference/android/content/UriMatcher.html`. |

## Public methods

### asPredicate

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

```
public static @NonNull Predicate<Uri> asPredicate(@NonNull UriMatcher matcher)
```

Creates a Uri predicate from a `https://developer.android.com/reference/android/content/UriMatcher.html`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/UriMatcher.html matcher` | the uriMatcher. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/core/util/Predicate<https://developer.android.com/reference/android/net/Uri.html>` | the predicate created from the uriMatcher. |