DittoDocumentIDPath

class DittoDocumentIDPath

Provides an interface to specify a path to a key in a document ID that you can then call a function on to get the value at the specified key as a specific type. You obtain a DittoDocumentIDPath by subscripting a DittoDocumentID and you can then further subscript a DittoDocumentIDPath to further specify the key of the document ID that you want to get the value of.

Functions

Link copied to clipboard
operator fun get(index: Int): DittoDocumentIDPath

Used to specify an index in the array at the preceding key-path specified through the subscripting defined previously. You can subscript the return value further to access a further nested key in the document ID.

operator fun get(key: String): DittoDocumentIDPath

Used to specify a path to a key in the document ID that you can subscript further to access a nested key in the document ID.

Properties

Link copied to clipboard
val boolean: Boolean?

Returns the value at the previously specified key in the document as a Boolean if possible, otherwise the return value will be null.

Link copied to clipboard
val booleanValue: Boolean

Returns the value at the previously specified key in the document as a Boolean. If the key was invalid the return value will be false.

Link copied to clipboard
val int: Int?

Returns the value at the previously specified key in the document as an Int if possible, otherwise the return value will be null.

Link copied to clipboard
val intValue: Int

Returns the value at the previously specified key in the document as an Int. If the key was invalid the return value will be 0.

Link copied to clipboard
val list: List<Any?>?

Returns the value at the previously specified key in the document as a List<Any?> if possible, otherwise the return value will be null.

Link copied to clipboard
val listValue: List<Any?>

Returns the value at the previously specified key in the document as a List<Any?>. If the key was invalid the return value will be an empty list.

Link copied to clipboard
val map: Map<String, Any?>?

Returns the value at the previously specified key in the document as a Map<String, Any?> if possible, otherwise the return value will be null.

Link copied to clipboard
val mapValue: Map<String, Any?>

Returns the value at the previously specified key in the document as a Map<String, Any?>. If the key was invalid the return value will be an empty dictionary.

Link copied to clipboard
val string: String?

Returns the value at the previously specified key in the document as a String if possible, otherwise the return value will be null.

Link copied to clipboard
val stringValue: String

Returns the value at the previously specified key in the document as a String. If the key was invalid the return value will be an empty string.

Link copied to clipboard
val value: Any?

Returns the value at the previously specified key in the document as an Any? if possible, otherwise the return value will be null