NavType.ParcelableArrayType
public final class NavType.ParcelableArrayType<D extends Parcelable> extends NavType
ParcelableArrayType is used for NavArguments which hold arrays of Parcelables.
Null values are supported. Default values in Navigation XML files are not supported.
Summary
Public fields |
|
|---|---|
boolean |
Check if an argument with this type can hold a null value. |
@NonNull String |
The name of this type. |
Public constructors |
|
|---|---|
<D extends Parcelable> ParcelableArrayType(@NonNull Class<@NonNull D> type) |
|
Public methods |
|
|---|---|
boolean |
|
@Nullable Array<@NonNull D> |
Get a value of this type from the |
int |
hashCode() |
@NonNull Array<@NonNull D> |
parseValue(@NonNull String value) |
void |
Put a value of this type in the |
Public fields
isNullableAllowed
@NonNull
public boolean isNullableAllowed
Check if an argument with this type can hold a null value.
| Returns | |
|---|---|
boolean |
Returns true if this type allows null values, false otherwise. |
name
@NonNull
public @NonNull String name
The name of this type.
This is the same value that is used in Navigation XML argType attribute.
Public constructors
ParcelableArrayType
public final <D extends Parcelable> ParcelableArrayType(@NonNull Class<@NonNull D> type)
Public methods
get
@Nullable
public Array<@NonNull D> get(@NonNull Bundle bundle, @NonNull String key)
Get a value of this type from the bundle
parseValue
@NonNull
public Array<@NonNull D> parseValue(@NonNull String value)
| Throws | |
|---|---|
kotlin.UnsupportedOperationException |
since Arrays do not support default values |
put
@NonNull
public void put(
@NonNull Bundle bundle,
@NonNull String key,
@Nullable Array<@NonNull D> value
)
Put a value of this type in the bundle