Class Viv.Result

java.lang.Object
com.benesult.vivjson.Viv.Result
Enclosing class:
Viv

public static class Viv.Result extends Object
Result data class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    Error message if the task is failed.
    It will be "" if the task is succeeded.
    final @Nullable Object
    The returned value if the task is succeeded.
    It will be null if the task is failed.
    Note that the returned value may be null.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Result(@Nullable Object value, String errorMessage)
    Constructor for Result data class.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • value

      public final @Nullable Object value
      The returned value if the task is succeeded.
      It will be null if the task is failed.
      Note that the returned value may be null.
    • errorMessage

      public final String errorMessage
      Error message if the task is failed.
      It will be "" if the task is succeeded.
  • Constructor Details

    • Result

      public Result(@Nullable Object value, String errorMessage)
      Constructor for Result data class.