SHARE
TWEET

Untitled

a guest Aug 24th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.      * 根据枚举Key获取相应的枚举对象
  3.      *
  4.      * @param key 枚举的key
  5.      * @return 枚举对象
  6.      */
  7.     public static ConfigTypeEnum getEnum(Integer key) {
  8.         ConfigTypeEnum resultEnum = null;
  9.         ConfigTypeEnum[] enumAry = ConfigTypeEnum.values();
  10.         for (ConfigTypeEnum mapEnum : enumAry) {
  11.             if (key.compareTo(mapEnum.getId()) == 0) {
  12.                 resultEnum = mapEnum;
  13.                 break;
  14.             }
  15.         }
  16.         return resultEnum;
  17.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top