dengzedong
2024-12-19 85b2001c0ec2f1adc598db3bf47ad457dcca7074
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
28
package com.iailab.netsdk.lib.enumeration;
 
/**
 * @author 47081
 * @version 1.0
 * @description 诊断结果状态
 * @date 2021/2/22
 */
public enum EM_COLLECTIVITY_STATE {
  /** 成功 */
  EM_COLLECTIVITY_STATE_SUCCESSED,
  /** 失败 */
  EM_COLLECTIVITY_STATE_FAILED;
 
  /**
   * 默认返回failed
   * @param state
   * @return
   */
  public EM_COLLECTIVITY_STATE getCollectivityState(int state) {
    for (EM_COLLECTIVITY_STATE collectivityState : EM_COLLECTIVITY_STATE.values()) {
      if (collectivityState.ordinal() == state) {
        return collectivityState;
      }
    }
    return EM_COLLECTIVITY_STATE_FAILED;
  }
}