sippo-sdk / com.quobis.sippo.sipposdk.common / Either / Success

Success

data class Success<out V> : Either<V, Nothing>

Successful result with value value.

Parameters

V - Type of the value.

Constructors

<init>

Success(value: V)

Successful result with value value.

Properties

value

val value: V

Inherited Properties

isFailure

val isFailure: Boolean

True if the result is an error, false otherwise.

isSuccess

val isSuccess: Boolean

True if the result was successful, false otherwise.

Functions

error

fun error(): Nothing?

Returns the error associated. In case of Success, error will be null.

value

fun value(): V

Returns the value associated. In case of Failure, value will be null.