MapLoadedData

data class MapLoadedData<out T>(result: MapLoader.LoadResult, value: T?)

Wrapper for the data and result of the operation.

Constructors

MapLoadedData
Link copied to clipboard
fun <out T> MapLoadedData(result: MapLoader.LoadResult, value: T? = null)

Functions

getOrThrow
Link copied to clipboard
fun getOrThrow(): T
Returns the loaded data if it wasn't null, otherwise throws NullPointerException.

Properties

isFailure
Link copied to clipboard
val isFailure: Boolean
Whether the operation failed.
isSuccess
Link copied to clipboard
val isSuccess: Boolean
Whether the operation was successful.
result
Link copied to clipboard
val result: MapLoader.LoadResult
result of the operation
value
Link copied to clipboard
val value: T? = null
loaded data of the operation is it was successful, otherwise null