Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.misc/TealiumResult

TealiumResult

class TealiumResult<T>

Result class to support compatibility with Java

Types

Companion
Link copied to clipboard
object Companion

Properties

isFailure
Link copied to clipboard
val isFailure: Boolean

Specifies whether the result was a failure

isSuccess
Link copied to clipboard
val isSuccess: Boolean

Specifies whether the result was successful

Functions

exceptionOrNull
Link copied to clipboard
fun exceptionOrNull(): Throwable?

Gets the exception, if it was a failure, or null if it was successful

getOrNull
Link copied to clipboard
fun getOrNull(): T?

Gets the result, if successful, or null if it was a failure

getOrThrow
Link copied to clipboard
fun getOrThrow(): T

Gets the result, if successful, or throws an exception if it was a failure

onFailure
Link copied to clipboard
fun onFailure(action: Callback<Throwable>): TealiumResult<T>

Executes the given action when the TealiumResult was a failure.

inline fun onFailure(block: (ex: Throwable) -> Unit): TealiumResult<T>

Executes the given block when the TealiumResult was a failure.

onSuccess
Link copied to clipboard
fun onSuccess(action: Callback<T>): TealiumResult<T>

Executes the given action when the TealiumResult was a success.

inline fun onSuccess(block: (value: T) -> Unit): TealiumResult<T>

Executes the given block when the TealiumResult was a success.

Generated by Dokka
(c) Tealium 2026