# UriMatchResult

Artifact: [androidx.navigation3:navigation3-runtime](https://developer.android.com/jetpack/androidx/releases/navigation3) [View Source](https://cs.android.com/search?q=file:androidx/navigation3/runtime/deeplink/UriDeepLinkMatcher.kt+class:androidx.navigation3.runtime.deeplink.UriMatchResult) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.2.0) Common/AllAndroid/JVM
- Cmn

  ```
  open class UriMatchResult<T : Any> : DeepLinkMatcher.MatchResult<T>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.navigation3.runtime.deeplink.DeepLinkMatcher.MatchResult](https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkMatcher.MatchResult)\<T\> ||
|   | ↳ | [androidx.navigation3.runtime.deeplink.UriMatchResult](https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult) |

*** ** * ** ***

The class that is returned when a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriDeepLinkMatcher` matches with a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkRequest`

**Match Order** When comparing two `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult`s, the following criteria are used to determine the winner:

1. MatchResult type: This result wins if the other `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/-match-result/index.html` is not a `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult`

2. Exact Path: A match with an exact path wins over a match with path wildcard or path arguments.

3. Path Argument Count: A match with more extracted path arguments wins.

4. Presence of Arguments: A match that contains arguments wins over one that has none.

5. Total Argument Count: A match with more total arguments (path + query + fragment) wins.

## Summary

| ### Public constructors |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult#UriMatchResult(kotlin.Any,kotlin.collections.Map)(key: T, arguments: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>>)` | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult#compareTo(androidx.navigation3.runtime.deeplink.DeepLinkMatcher.MatchResult)(other: https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkMatcher.MatchResult<T>)` Compares this matcher with the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult#compareTo(androidx.navigation3.runtime.deeplink.DeepLinkMatcher.MatchResult)` for sorting order. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>>` | `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult#arguments()` the map of arguments extracted from the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkRequest` | Cmn |

| ### Protected properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult#isExactPath()` Indicates whether the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriDeepLinkMatcher` and `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkRequest` match that produced this result was matched on an exact uri path, meaning a path that | Cmn |

### Inherited properties

From [androidx.navigation3.runtime.deeplink.DeepLinkMatcher.MatchResult](https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkMatcher.MatchResult) `T` `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkMatcher.MatchResult#key()`

the navigation key representing the deep link target
Cmn

## Public constructors

### UriMatchResult

Cmn

```
<T : Any> UriMatchResult(
    key: T,
    arguments: Map<String, List<String>> = emptyMap()
)
```

| Parameters |
|---|---|
| `key: T` | the navigation key representing the deep link target |
| `arguments: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>> = emptyMap()` | the map of arguments extracted from the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkRequest` |

## Public functions

### compareTo

Cmn

```
open operator fun compareTo(other: DeepLinkMatcher.MatchResult<T>): Int
```

Compares this matcher with the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult#compareTo(androidx.navigation3.runtime.deeplink.DeepLinkMatcher.MatchResult)` for sorting order.

Returns:

- 1 if this result is bigger

- 0 if they are equal

- -1 if this result is smaller

| Parameters |
|---|---|
| `other: https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkMatcher.MatchResult<T>` | the other `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/-match-result/index.html` to compare with |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriMatchResult` | for matching priority |

## Public properties

### arguments

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.2.0)

```
val arguments: Map<String, List<String>>
```

the map of arguments extracted from the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkRequest`

## Protected properties

### isExactPath

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigation3#1.2.0)

```
protected var isExactPath: Boolean
```

Indicates whether the `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriDeepLinkMatcher` and `https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/DeepLinkRequest` match that produced this result was matched on an exact uri path, meaning a path that

1. does not contain any arguments

2. does not contain any wildcards

True if it is an exact path, false otherwise.