Sensorberg Smart Spaces SDK for Android / com.sensorberg.response

Package com.sensorberg.response

Types

Response

A Generic data holder that contains both the data and the status of the process that generates the data.

data class Response<TYPE, PROGRESS>

Result

Result of a type T.

sealed class Result<T>

SimpleResponse

A simplification of the Response type that the Response.progress is Void and it's value is always 'null'

typealias SimpleResponse<TYPE> = Response<TYPE, Void>

Functions

map

Maps the Response.data from one type to another. Keeps Response.status, Response.progress and Response.exception unchanged.

fun <I, O, P> Response<I, P>?.map(mapper: (I?) -> O?): Response<O, P>?