NavArgumentBuilder
@NavDestinationDsl
public final class NavArgumentBuilder
DSL for constructing a new NavArgument
Summary
Public constructors |
|---|
Public methods |
|
|---|---|
final @NonNull NavArgument |
build()Builds the NavArgument by calling |
final Object |
An optional default value for this argument. |
final boolean |
Controls if this argument allows null values. |
final @NonNull NavType<@NonNull ?> |
getType()The NavType for this argument. |
final void |
setDefaultValue(Object defaultValue)An optional default value for this argument. |
final void |
setNullable(boolean nullable)Controls if this argument allows null values. |
final void |
The NavType for this argument. |
Public constructors
Public methods
build
public final @NonNull NavArgument build()
Builds the NavArgument by calling NavArgument.Builder.build.
getDefaultValue
public final Object getDefaultValue()
An optional default value for this argument.
Any object that you set here must be compatible with type, if it was specified.
getNullable
public final boolean getNullable()
Controls if this argument allows null values.
getType
public final @NonNull NavType<@NonNull ?> getType()
The NavType for this argument.
If you don't set a type explicitly, it will be inferred from the default value of this argument.
setDefaultValue
public final void setDefaultValue(Object defaultValue)
An optional default value for this argument.
Any object that you set here must be compatible with type, if it was specified.
setNullable
public final void setNullable(boolean nullable)
Controls if this argument allows null values.