NavArgumentBuilder

public final class NavArgumentBuilder


DSL for constructing a new NavArgument

Summary

Public fields

final @Nullable Object

An optional default value for this argument.

final boolean

Controls if this argument allows null values.

final @NonNull NavType<@NonNull ?>

The NavType for this argument.

Public constructors

Public methods

final @NonNull NavArgument

Builds the NavArgument by calling NavArgument.Builder.build.

Public fields

defaultValue

@Nullable
public final @Nullable Object defaultValue

An optional default value for this argument.

Any object that you set here must be compatible with type, if it was specified.

nullable

@NonNull
public final boolean nullable

Controls if this argument allows null values.

type

@NonNull
public final @NonNull NavType<@NonNull ?> type

The NavType for this argument.

If you don't set a type explicitly, it will be inferred from the default value of this argument.

Public constructors

public final NavArgumentBuilder()

Public methods

build

@NonNull
public final NavArgument build()

Builds the NavArgument by calling NavArgument.Builder.build.