Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.data/DataItem/Companion

Companion

object Companion

Properties

NULL
Link copied to clipboard
@JvmField
val NULL: DataItem

Constant value representing null.

Functions

boolean
Link copied to clipboard
@JvmStatic
fun boolean(boolean: Boolean?): DataItem

Creates a DataItem that contains a boolean as its value

convert
Link copied to clipboard
@JvmStatic
fun convert(any: Any?): DataItem

Attempts to create a DataItem that contains any as its value. If the conversion to a DataItem fails for any reason, then the NULL value is returned instead.

@JvmStatic
fun convert(any: Any?, default: DataItem): DataItem

Attempts to create a DataItem that contains any as its value. If the conversion to a DataItem fails for any reason, then the default value is returned instead.

convertOrNull
Link copied to clipboard
@JvmStatic
fun convertOrNull(any: Any?): DataItem

Converts an object of unknown type. This method is not guaranteed to succeed. For unsupported types, NULL will be returned.

double
Link copied to clipboard
@JvmStatic
fun double(double: Double?): DataItem

Creates a DataItem that contains a double as its value

int
Link copied to clipboard
@JvmStatic
fun int(int: Int?): DataItem

Creates a DataItem that contains a int as its value

long
Link copied to clipboard
@JvmStatic
fun long(long: Long?): DataItem

Creates a DataItem that contains a long as its value

parse
Link copied to clipboard
fun parse(string: String): DataItem

Creates a DataItem from it's string representation, parsing the contents of the string as if it were JSON i.e. string values should be quoted "value"

string
Link copied to clipboard
@JvmStatic
fun string(string: String?): DataItem

Creates a DataItem that contains a string as its value

Generated by Dokka
(c) Tealium 2026