INNER CODE UNIT · Kotlin
BaseRegistry
airbnb/DeepLinkDispatch · deeplinkdispatch-base/src/main/java/com/airbnb/deeplinkdispatch/BaseRegistry.kt:20
abstract class BaseRegistry(
matchIndexArray: ByteArray,
pathSegmentReplacementKeys: Array<String>,
) {
val pathSegmentReplacementKeysInRegistry = Utils.toByteArraysList(pathSegmentReplacementKeys)
private val matchIndex: MatchIndex = MatchIndex(matchIndexArray)
/**
* Use a binary match index to match the given URL. Defaults can be find in [MatchIndex].
*
* @param deepLinkUri The inbound [DeepLinkUri] to match. In the typical use-case, this inbound
* URI comes from an Android Intent.
* @param pathSegmentReplacements originally passed into DLD via [BaseDeepLinkDelegate]. User
* provided replacement values for configurable path segments.
* Ex: mapOf("replaceable" to "swish") and
* a://host/<replaceable> will result in a://host/swish being a match (and
* a://host/<replaceable> is not a match).
* @return A [DeepLinkEntry] if a match was found or null if not.