Target filter
Search Kotlin docs
  • Back
  • Tealium Prism Kotlin SDK Reference
core/com.tealium.prism.core.api.data/DataList/Builder/add

add

@JvmOverloads
fun add(value: String, index: Int = DEFAULT_INDEX): DataList.Builder

Adds a String to the List.

Return

The current Builder instance.

Parameters

value

The String instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds


@JvmOverloads
fun add(value: Int, index: Int = DEFAULT_INDEX): DataList.Builder

Adds an Int to the List.

Return

The current Builder instance.

Parameters

value

The Int instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds


@JvmOverloads
fun add(value: Long, index: Int = DEFAULT_INDEX): DataList.Builder

Adds a Long to the List.

Return

The current Builder instance.

Parameters

value

The Long instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds


@JvmOverloads
fun add(value: Double, index: Int = DEFAULT_INDEX): DataList.Builder

Adds a Double to the List.

Return

The current Builder instance.

Parameters

value

The Double instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds


@JvmOverloads
fun add(value: Boolean, index: Int = DEFAULT_INDEX): DataList.Builder

Adds a Boolean to the List.

Return

The current Builder instance.

Parameters

value

The Boolean instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds


@JvmOverloads
fun add(value: DataItem, index: Int = DEFAULT_INDEX): DataList.Builder

Adds a DataItem to the List.

Return

The current Builder instance.

Parameters

value

The DataItem instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds


@JvmOverloads
fun add(value: DataItemConvertible, index: Int = DEFAULT_INDEX): DataList.Builder

Adds a DataItemConvertible to the list. The value is first converted into a DataItem using its implementation of asDataItem.

Return

The current Builder instance.

Parameters

value

The DataItemConvertible instance to add

index

Optional list index to insert the item at; the item is appended if index is out of bounds

Generated by Dokka
(c) Tealium 2026