Builder

class Builder
kotlin.Any
   ↳ androidx.navigation.NavDeepLinkRequest.Builder

A builder for constructing NavDeepLinkRequest instances.

Summary

Public methods
NavDeepLinkRequest

Build the NavDeepLinkRequest specified by this builder.

static NavDeepLinkRequest.Builder
fromAction(@NonNull action: String)

Creates a NavDeepLinkRequest.Builder with a set action.

static NavDeepLinkRequest.Builder
fromMimeType(@NonNull mimeType: String)

Creates a NavDeepLinkRequest.Builder with a set mimeType.

static NavDeepLinkRequest.Builder
fromUri(@NonNull uri: Uri)

Creates a NavDeepLinkRequest.Builder with a set uri.

NavDeepLinkRequest.Builder
setAction(@NonNull action: String)

Set the action for the NavDeepLinkRequest.

NavDeepLinkRequest.Builder
setMimeType(@NonNull mimeType: String)

Set the mimeType for the NavDeepLinkRequest.

NavDeepLinkRequest.Builder
setUri(@NonNull uri: Uri)

Set the uri for the NavDeepLinkRequest.

Public methods

build

@NonNull fun build(): NavDeepLinkRequest

Build the NavDeepLinkRequest specified by this builder.

Return
NavDeepLinkRequest the newly constructed NavDeepLinkRequest

fromAction

@NonNull static fun fromAction(@NonNull action: String): NavDeepLinkRequest.Builder

Creates a NavDeepLinkRequest.Builder with a set action.

Parameters
action String: the intent action for the NavDeepLinkRequest
Return
NavDeepLinkRequest.Builder a Builder instance
Exceptions
IllegalArgumentException if the action is empty.

fromMimeType

@NonNull static fun fromMimeType(@NonNull mimeType: String): NavDeepLinkRequest.Builder

Creates a NavDeepLinkRequest.Builder with a set mimeType.

Parameters
mimeType String: the mimeType for the NavDeepLinkRequest
Return
NavDeepLinkRequest.Builder a Builder instance

fromUri

@NonNull static fun fromUri(@NonNull uri: Uri): NavDeepLinkRequest.Builder

Creates a NavDeepLinkRequest.Builder with a set uri.

Parameters
uri Uri: The uri to add to the NavDeepLinkRequest
Return
NavDeepLinkRequest.Builder a Builder instance

setAction

@NonNull fun setAction(@NonNull action: String): NavDeepLinkRequest.Builder

Set the action for the NavDeepLinkRequest.

Parameters
action String: the intent action for the NavDeepLinkRequest
Return
NavDeepLinkRequest.Builder This builder.
Exceptions
IllegalArgumentException if the action is empty.

setMimeType

@NonNull fun setMimeType(@NonNull mimeType: String): NavDeepLinkRequest.Builder

Set the mimeType for the NavDeepLinkRequest.

Parameters
mimeType String: the mimeType for the NavDeepLinkRequest
Return
NavDeepLinkRequest.Builder This builder.
Exceptions
IllegalArgumentException if the given mimeType does not match th3e required "type/subtype" format.

setUri

@NonNull fun setUri(@NonNull uri: Uri): NavDeepLinkRequest.Builder

Set the uri for the NavDeepLinkRequest.

Parameters
uri Uri: The uri to add to the NavDeepLinkRequest
Return
NavDeepLinkRequest.Builder This builder.