public class WebApiResponse<T> extends Object implements Serializable
| Constructor and Description |
|---|
WebApiResponse() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static <T> WebApiResponse<T> |
fail(ApiErrorCode apiErrorCode) |
static <T> WebApiResponse<T> |
fail(ApiErrorCode apiErrorCode,
T data) |
static <T> WebApiResponse<T> |
fail(int code,
String msg) |
int |
getCode() |
T |
getData() |
String |
getMsg() |
int |
hashCode() |
void |
setCode(int code) |
void |
setData(T data) |
void |
setMsg(String msg) |
static <T> WebApiResponse<T> |
success(T data) |
String |
toString() |
public static <T> WebApiResponse<T> success(T data)
public static <T> WebApiResponse<T> fail(ApiErrorCode apiErrorCode)
public static <T> WebApiResponse<T> fail(ApiErrorCode apiErrorCode, T data)
public static <T> WebApiResponse<T> fail(int code, String msg)
public int getCode()
public void setCode(int code)
public String getMsg()
public void setMsg(String msg)
public T getData()
public void setData(T data)
Copyright © 2021. All rights reserved.