CollectionNavType
-
Cmn
abstract class CollectionNavType<T : Any?> : NavType
A NavType for Collection such as arrays, lists, maps.
| Parameters | |
|---|---|
<T : Any?> |
the type of the data that is supported by this NavType |
Summary
Public constructors |
|
|---|---|
<T : Any?> CollectionNavType(isNullableAllowed: Boolean) |
Cmn
|
Public functions |
||
|---|---|---|
abstract T |
Create and return an empty collection of type |
Cmn
|
abstract List<String> |
serializeAsValues(value: T)Serialize a value of this NavType into a list of String. |
Cmn
|
Inherited functions |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited properties |
|---|
Public constructors
Public functions
emptyCollection
abstract fun emptyCollection(): T
Create and return an empty collection of type T
For example, T of type List
serializeAsValues
abstract fun serializeAsValues(value: T): List<String>
Serialize a value of this NavType into a list of String.
Each element in the collection should be converted to an individual String element of the returned list.
Note: Elements should be encoded with Uri.encode
| Parameters | |
|---|---|
value: T |
a value of this NavType |