hypertrack-sdk
hypertrack-sdk
/
com.hypertrack.sdk
/
Result
Result
open
class
Result
<
V
,
E
>
Content copied to clipboard
Abstract operation result
Functions
Extensions
Parameters
Parameters
<V>
type of returned value
<E>
type of errors.
Functions
failure
Link copied to clipboard
open
fun
<
V
,
E
>
failure
(
@
NonNull
error
:
E
)
:
Result
<
V
,
E
>
Content copied to clipboard
get
Error
Link copied to clipboard
@
NonNull
open
fun
getError
(
)
:
E
Content copied to clipboard
get
Value
Link copied to clipboard
@
NonNull
open
fun
getValue
(
)
:
V
Content copied to clipboard
is
Failure
Link copied to clipboard
open
fun
isFailure
(
)
:
Boolean
Content copied to clipboard
Returns true if result has no value and false otherwise
is
Success
Link copied to clipboard
open
fun
isSuccess
(
)
:
Boolean
Content copied to clipboard
Returns true if result has the value and false otherwise
success
Link copied to clipboard
open
fun
<
V
,
E
>
success
(
@
NonNull
value
:
V
)
:
Result
<
V
,
E
>
Content copied to clipboard
to
String
Link copied to clipboard
@
NonNull
open
fun
toString
(
)
:
String
Content copied to clipboard
Extensions
to
Sealed
Result
Link copied to clipboard
fun
<
S
,
F
>
Result
<
S
,
F
>
.
toSealedResult
(
)
:
SealedResult
<
S
,
F
>
Content copied to clipboard