Builder
class Builder
kotlin.Any | |
↳ | androidx.navigation.NavDeepLink.Builder |
A builder for constructing NavDeepLink
instances.
Summary
Public methods | |
---|---|
NavDeepLink |
build() Build the |
static NavDeepLink.Builder |
fromAction(@NonNull : String) Creates a |
static NavDeepLink.Builder |
fromMimeType(@NonNull : String) Creates a |
static NavDeepLink.Builder |
fromUriPattern(@NonNull : String) Creates a |
NavDeepLink.Builder |
Set the action for the |
NavDeepLink.Builder |
setMimeType(@NonNull : String) Set the mimeType for the |
NavDeepLink.Builder |
setUriPattern(@NonNull : String) Set the uri pattern for the |
Public methods
build
@NonNull fun build(): NavDeepLink
Build the NavDeepLink
specified by this builder.
Return | |
---|---|
NavDeepLink |
the newly constructed NavDeepLink. |
fromAction
@NonNull static fun fromAction(@NonNull : String): NavDeepLink.Builder
Creates a NavDeepLink.Builder
with a set action.
Parameters | |
---|---|
action |
String: the intent action for the NavDeepLink |
Return | |
---|---|
NavDeepLink.Builder |
a Builder instance |
Exceptions | |
---|---|
IllegalArgumentException |
if the action is empty. |
fromMimeType
@NonNull static fun fromMimeType(@NonNull : String): NavDeepLink.Builder
Creates a NavDeepLink.Builder
with a set mimeType.
Parameters | |
---|---|
mimeType |
String: the mimeType for the NavDeepLink |
Return | |
---|---|
NavDeepLink.Builder |
a Builder instance |
fromUriPattern
@NonNull static fun fromUriPattern(@NonNull : String): NavDeepLink.Builder
Creates a NavDeepLink.Builder
with a set uri pattern.
Parameters | |
---|---|
uriPattern |
String: The uri pattern to add to the NavDeepLink |
Return | |
---|---|
NavDeepLink.Builder |
a Builder instance |
setAction
@NonNull fun setAction(@NonNull : String): NavDeepLink.Builder
Set the action for the NavDeepLink
.
Parameters | |
---|---|
action |
String: the intent action for the NavDeepLink |
Return | |
---|---|
NavDeepLink.Builder |
This builder. |
Exceptions | |
---|---|
IllegalArgumentException |
if the action is empty. |
setMimeType
@NonNull fun setMimeType(@NonNull : String): NavDeepLink.Builder
Set the mimeType for the NavDeepLink
.
Parameters | |
---|---|
mimeType |
String: the mimeType for the NavDeepLink |
Return | |
---|---|
NavDeepLink.Builder |
This builder. |
setUriPattern
@NonNull fun setUriPattern(@NonNull : String): NavDeepLink.Builder
Set the uri pattern for the NavDeepLink
.
Parameters | |
---|---|
uriPattern |
String: The uri pattern to add to the NavDeepLink |
Return | |
---|---|
NavDeepLink.Builder |
This builder. |