类 Result<T>


  • public class Result<T>
    extends Object
    A class which wrap the result of the API
    • 构造器详细资料

      • Result

        public Result​(Status status,
                      T value)
      • Result

        public Result​(T value)
    • 方法详细资料

      • getStatus

        public Status getStatus()
      • getStatusMessage

        public String getStatusMessage()
      • getValue

        public T getValue()
      • ok

        public static <T> Result<T> ok​(T value)
      • error

        public static <T> Result<T> error​(String message)
      • fromResponse

        public static <T> Result<T> fromResponse​(ApiResponse<T> response)
      • isOk

        public boolean isOk()