public final class

NavType.ParcelableType<D>

extends NavType<java.lang.Object>

 java.lang.Object

androidx.navigation.NavType<java.lang.Object>

↳androidx.navigation.NavType.ParcelableType<D>

Overview

ParcelableType is used for passing Parcelables in NavArguments.

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

Summary

Fields
from NavType<T>BoolArrayType, BoolType, FloatArrayType, FloatType, IntArrayType, IntType, LongArrayType, LongType, ReferenceType, StringArrayType, StringType
Constructors
publicParcelableType(java.lang.Class<java.lang.Object> type)

Constructs a NavType that supports a given Parcelable type.

Methods
public booleanequals(java.lang.Object o)

public abstract java.lang.Objectget(Bundle bundle, java.lang.String key)

Get a value of this type from the bundle

public abstract java.lang.StringgetName()

Returns the name of this type.

public inthashCode()

public abstract java.lang.ObjectparseValue(java.lang.String value)

Parse a value of this type from a String.

public abstract voidput(Bundle bundle, java.lang.String key, java.lang.Object value)

Put a value of this type in he bundle

from NavType<T>fromArgType, isNullableAllowed, toString
from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructors

public ParcelableType(java.lang.Class<java.lang.Object> type)

Constructs a NavType that supports a given Parcelable type.

Parameters:

type: class that is a subtype of Parcelable

Methods

public abstract void put(Bundle bundle, java.lang.String key, java.lang.Object value)

Put a value of this type in he bundle

Parameters:

bundle: bundle to put value in
key: bundle key
value: value of this type

public abstract java.lang.Object get(Bundle bundle, java.lang.String key)

Get a value of this type from the bundle

Parameters:

bundle: bundle to get value from
key: bundle key

Returns:

value of this type

public abstract java.lang.Object parseValue(java.lang.String value)

Parse a value of this type from a String.

Parameters:

value: string representation of a value of this type

Returns:

parsed value of the type represented by this NavType

public abstract java.lang.String getName()

Returns the name of this type.

This is the same value that is used in Navigation XML argType attribute.

Returns:

name of this type

public boolean equals(java.lang.Object o)

public int hashCode()