1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| package com.zy.acs.manager.manager.enums;
|
| import com.zy.acs.framework.common.Cools;
| import com.zy.acs.framework.exception.CoolException;
|
| public enum StaReserveStateType {
|
| RESERVED,
| WAITING,
| CONFIRMED,
| CANCELLED,
| TIMEOUT,
| ;
|
| public static StaReserveStateType of(String state) {
| if (Cools.isEmpty(state)) {
| return null;
| }
| for (StaReserveStateType type : StaReserveStateType.values()) {
| if (type.toString().equals(state)) {
| return type;
| }
| }
| throw new CoolException("failed to find StaReserveStateType for [" + state + "]");
| }
|
| }
|
|