T
- public class RestResponse<T> extends Object
构造器和说明 |
---|
RestResponse() |
RestResponse(boolean success) |
RestResponse(boolean success,
T payload) |
限定符和类型 | 方法和说明 |
---|---|
static RestResponse |
fail() |
static RestResponse |
fail(int code) |
static RestResponse |
fail(int code,
String msg) |
static RestResponse |
fail(String msg) |
int |
getCode() |
String |
getMsg() |
T |
getPayload() |
long |
getTimestamp() |
boolean |
isSuccess() |
static RestResponse |
ok() |
static <T> RestResponse |
ok(T payload) |
static <T> RestResponse |
ok(T payload,
int code) |
void |
setCode(int code) |
public RestResponse()
public RestResponse(boolean success)
public RestResponse(boolean success, T payload)
public T getPayload()
public boolean isSuccess()
public String getMsg()
public int getCode()
public void setCode(int code)
public long getTimestamp()
public static RestResponse ok()
public static <T> RestResponse ok(T payload)
public static <T> RestResponse ok(T payload, int code)
public static RestResponse fail()
public static RestResponse fail(String msg)
public static RestResponse fail(int code)
public static RestResponse fail(int code, String msg)
Copyright © 2018. All rights reserved.