Try

sealed class Try<T>

Types

Companion
Link copied to clipboard
common
object Companion
Failure
Link copied to clipboard
common
data class Failure<T>(error: Throwable) : Try<T>
Success
Link copied to clipboard
common
data class Success<T>(result: T) : Try<T>

Functions

get
Link copied to clipboard
common
abstract fun get(): T
getOrElse
Link copied to clipboard
common
abstract fun getOrElse(f: () -> T): T
map
Link copied to clipboard
common
abstract fun <R> map(f: (T) -> R): Try<R>
recoverWith
Link copied to clipboard
common
abstract fun recoverWith(f: () -> Try<T>): Try<T>

Properties

isFailure
Link copied to clipboard
common
val isFailure: Boolean
isSuccess
Link copied to clipboard
common
abstract val isSuccess: Boolean

Inheritors

Try
Link copied to clipboard
Try
Link copied to clipboard