MatchResult

class MatchResult(val variables: Map<String, String>, val score: Int)(source)

Represents the result of a successful template match.

A higher score indicates a more specific match. Implementations must ensure that literal segment matches contribute more to the score than variable captures, so that a fully literal template (e.g., users/profile) always outscores a parameterized template (e.g., users/{id}) for the same URI.

Constructors

Link copied to clipboard
constructor(variables: Map<String, String>, score: Int)

Properties

Link copied to clipboard
val score: Int

A non-negative measure of match specificity — higher means more literal segments matched.

Link copied to clipboard

A mapping of variable names in the template to their matched values in the URL.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String