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

Package com.sensorberg.response

Types

Response

data class Response<TYPE, PROGRESS>

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

Type Aliases

SimpleResponse

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

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

Functions

map

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

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