UriMatchResult
-
Cmn
open class UriMatchResult<T : Any> : DeepLinkMatcher.MatchResult
| kotlin.Any | ||
| ↳ | androidx.navigation3.runtime.deeplink.DeepLinkMatcher.MatchResult | |
| ↳ | androidx.navigation3.runtime.deeplink.UriMatchResult |
The class that is returned when a UriDeepLinkMatcher matches with a DeepLinkRequest
Match Order When comparing two UriMatchResults, the following criteria are used to determine the winner:
-
MatchResult type: This result wins if the other
MatchResultis not aUriMatchResult -
Exact Path: A match with an exact path wins over a match with path wildcard or path arguments.
-
Path Argument Count: A match with more extracted path arguments wins.
-
Presence of Arguments: A match that contains arguments wins over one that has none.
-
Total Argument Count: A match with more total arguments (path + query + fragment) wins.
Summary
Public functions |
||
|---|---|---|
open operator Int |
compareTo(other: DeepLinkMatcher.MatchResult<T>)Compares this matcher with the |
Cmn
|
Public properties |
||
|---|---|---|
Map<String, List<String>> |
the map of arguments extracted from the |
Cmn
|
Protected properties |
||
|---|---|---|
Boolean |
Indicates whether the |
Cmn
|
Inherited properties |
|||
|---|---|---|---|
|
Public functions
compareTo
open operator fun compareTo(other: DeepLinkMatcher.MatchResult<T>): Int
Compares this matcher with the other for sorting order.
Returns:
-
1 if this result is bigger
-
0 if they are equal
-
-1 if this result is smaller
| Parameters | |
|---|---|
other: DeepLinkMatcher.MatchResult<T> |
the other |
| See also | |
|---|---|
UriMatchResult |
for matching priority |
Protected properties
isExactPath
protected var isExactPath: Boolean
Indicates whether the UriDeepLinkMatcher and DeepLinkRequest match that produced this result was matched on an exact uri path, meaning a path that
-
does not contain any arguments
-
does not contain any wildcards
True if it is an exact path, false otherwise.