public enum ApiErrorCode extends Enum<ApiErrorCode> implements IErrorCode
| 限定符和类型 | 方法和说明 |
|---|---|
static ApiErrorCode |
fromCode(long code) |
long |
getCode()
错误编码 -1、失败 0、成功
|
String |
getMsg()
错误描述
|
String |
toString() |
static ApiErrorCode |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ApiErrorCode[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ApiErrorCode FAILED
public static final ApiErrorCode SUCCESS
public static ApiErrorCode[] values()
for (ApiErrorCode c : ApiErrorCode.values()) System.out.println(c);
public static ApiErrorCode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public static ApiErrorCode fromCode(long code)
public long getCode()
IErrorCodegetCode 在接口中 IErrorCodepublic String getMsg()
IErrorCodegetMsg 在接口中 IErrorCodepublic String toString()
toString 在类中 Enum<ApiErrorCode>