NavType.SerializableArrayType
public
static
final
class
NavType.SerializableArrayType
extends NavType<D[] extends Serializable>
| java.lang.Object
|
| ↳ |
androidx.navigation.NavType<D[] extends java.io.Serializable>
|
| |
↳ |
androidx.navigation.NavType.SerializableArrayType<D extends java.io.Serializable>
|
SerializableArrayType is used for NavArguments that hold arrays of Serializables.
This type also supports arrays of Enums.
Null values are supported.
Default values in Navigation XML files are not supported.
Summary
Inherited fields |
From class
androidx.navigation.NavType
public
static
final
NavType<boolean[]> |
BoolArrayType
NavType for storing boolean arrays,
corresponding with the "boolean[]" type in a Navigation XML file.
|
public
static
final
NavType<Boolean> |
BoolType
NavType for storing boolean values,
corresponding with the "boolean" type in a Navigation XML file.
|
public
static
final
NavType<float[]> |
FloatArrayType
NavType for storing float arrays,
corresponding with the "float[]" type in a Navigation XML file.
|
public
static
final
NavType<Float> |
FloatType
NavType for storing float values,
corresponding with the "float" type in a Navigation XML file.
|
public
static
final
NavType<int[]> |
IntArrayType
NavType for storing integer arrays,
corresponding with the "integer[]" type in a Navigation XML file.
|
public
static
final
NavType<Integer> |
IntType
NavType for storing integer values,
corresponding with the "integer" type in a Navigation XML file.
|
public
static
final
NavType<long[]> |
LongArrayType
NavType for storing long arrays,
corresponding with the "long[]" type in a Navigation XML file.
|
public
static
final
NavType<Long> |
LongType
NavType for storing long values,
corresponding with the "long" type in a Navigation XML file.
|
public
static
final
NavType<Integer> |
ReferenceType
NavType for storing integer values representing resource ids,
corresponding with the "reference" type in a Navigation XML file.
|
public
static
final
NavType<String[]> |
StringArrayType
NavType for storing String arrays,
corresponding with the "string[]" type in a Navigation XML file.
|
public
static
final
NavType<String> |
StringType
NavType for storing String values,
corresponding with the "string" type in a Navigation XML file.
|
|
Public methods |
boolean
|
equals(Object o)
|
D[]
|
get(Bundle bundle, String key)
Get a value of this type from the bundle
|
String
|
getName()
Returns the name of this type.
|
int
|
hashCode()
|
D[]
|
parseValue(String value)
Parse a value of this type from a String.
|
void
|
put(Bundle bundle, String key, D[] value)
Put a value of this type in he bundle
|
Inherited methods |
From class
androidx.navigation.NavType
static
NavType<?>
|
fromArgType(String type, String packageName)
Parse an argType string into a NavType.
|
abstract
D[] extends Serializable
|
get(Bundle bundle, String key)
Get a value of this type from the bundle
|
abstract
String
|
getName()
Returns the name of this type.
|
boolean
|
isNullableAllowed()
Check if an argument with this type can hold a null value.
|
abstract
D[] extends Serializable
|
parseValue(String value)
Parse a value of this type from a String.
|
abstract
void
|
put(Bundle bundle, String key, D[] value)
Put a value of this type in he bundle
|
String
|
toString()
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
NavType.SerializableArrayType
public NavType.SerializableArrayType (Class<D> type)
Constructs a NavType that supports arrays of a given Serializable type.
| Parameters |
type |
Class: class that is a subtype of Serializable
|
Public methods
equals
public boolean equals (Object o)
get
public D[] get (Bundle bundle,
String key)
Get a value of this type from the bundle
| Parameters |
bundle |
Bundle: bundle to get value from |
key |
String: bundle key |
| Returns |
D[] |
value of this type
|
getName
public String getName ()
Returns the name of this type.
This is the same value that is used in Navigation XML argType attribute.
| Returns |
String |
name of this type
|
hashCode
public int hashCode ()
parseValue
public D[] parseValue (String value)
Parse a value of this type from a String.
| Parameters |
value |
String: string representation of a value of this type |
| Returns |
D[] |
parsed value of the type represented by this NavType |
put
public void put (Bundle bundle,
String key,
D[] value)
Put a value of this type in he bundle
| Parameters |
bundle |
Bundle: bundle to put value in |
key |
String: bundle key |
value |
D: value of this type
|