public static enum ResultModel.resultStatus extends Enum<ResultModel.resultStatus>
Enum Constant and Description |
---|
STATUS_FAIL
失败状态
|
STATUS_SUCCESS
成功状态
|
Modifier and Type | Method and Description |
---|---|
int |
toInt()
返回状态代号
方法说明: toInt
输入参数说明: @return
输出参数说明: int
|
String |
toString()
方法说明 重写toString()方法,这样,resultStatus.STATUS_SUCCESS 的打印值为 “1”
输入参数说明
输出参数说明
|
static ResultModel.resultStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResultModel.resultStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResultModel.resultStatus STATUS_FAIL
public static final ResultModel.resultStatus STATUS_SUCCESS
public static ResultModel.resultStatus[] values()
for (ResultModel.resultStatus c : ResultModel.resultStatus.values()) System.out.println(c);
public static ResultModel.resultStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int toInt()
public String toString()
toString
in class Enum<ResultModel.resultStatus>
Copyright © 2018. All rights reserved.