NavType.ParcelableType


public final class NavType.ParcelableType<D extends Object> extends NavType


ParcelableType is used for passing Parcelables in NavArguments.

Null values are supported. Default values in Navigation XML files are not supported.

Summary

Public constructors

<D extends Object> ParcelableType(@NonNull Class<@NonNull D> type)

Public methods

boolean
equals(Object other)
D
get(@NonNull Bundle bundle, @NonNull String key)
@NonNull String
int
@NonNull D
void
put(@NonNull Bundle bundle, @NonNull String key, @NonNull D value)

Inherited methods

From androidx.navigation.NavType
boolean
@NonNull D
parseValue(@NonNull String value, @NonNull D previousValue)
@NonNull String
@NonNull String
boolean
valueEquals(@NonNull D value, @NonNull D other)

Public constructors

ParcelableType

public <D extends Object> ParcelableType(@NonNull Class<@NonNull D> type)
Parameters
@NonNull Class<@NonNull D> type

the Parcelable class that is supported by this NavType

Public methods

equals

public boolean equals(Object other)

get

public D get(@NonNull Bundle bundle, @NonNull String key)

getName

public @NonNull String getName()

hashCode

public int hashCode()

parseValue

public @NonNullparseValue(@NonNull String value)
Throws
kotlin.UnsupportedOperationException

since Parcelables do not support default values

put

Added in 1.0.0
public void put(@NonNull Bundle bundle, @NonNull String key, @NonNull D value)