Stay organized with collections
Save and categorize content based on your preferences.
Results
object
Results
Direct use of Results
is not supported.
Helper functions to create common formats of Result
.
Summary
Result
Returns a Result
with a resultCode
of ERROR
and a specified errorCode
.
Result
A Result
with a resultCode
of CANCELLED
.
Result
A Result
with a resultCode
of ERROR
with an errorCode
of UNKNOWN
.
Result
A Result
with a resultCode
of SUCCESS
.
Public methods
forError
fun
forError
(
errorCode
:
ErrorCode
)
:
Result
Returns a Result
with a resultCode
of ERROR
and a specified errorCode
.
Properties
CANCELLED
val
CANCELLED
:
Result
A Result
with a resultCode
of CANCELLED
.
ERROR_UNKNOWN
val
ERROR_UNKNOWN
:
Result
A Result
with a resultCode
of ERROR
with an errorCode
of UNKNOWN
.
SUCCESS
val
SUCCESS
:
Result
A Result
with a resultCode
of SUCCESS
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[],["The `Results` object, not for direct use, provides helper functions to create `Result` formats. `forError` generates a `Result` with an `ERROR` `resultCode` and a given `errorCode`. `CANCELLED`, `ERROR_UNKNOWN`, and `SUCCESS` are predefined `Result` instances. `CANCELLED` has a `CANCELLED` `resultCode`, `ERROR_UNKNOWN` has an `ERROR` `resultCode` and `UNKNOWN` `errorCode`, and `SUCCESS` has a `SUCCESS` `resultCode`. These functions help build standardized results with relevant codes.\n"]]