Example #1
0
 public static int getMoney(int type) {
   for (PAY c : PAY.values()) {
     if (c.getType() == type) {
       return c.money;
     }
   }
   return 0;
 }
Example #2
0
 public static String getDesc(int type) {
   for (PAY c : PAY.values()) {
     if (c.getType() == type) {
       return c.desc;
     }
   }
   return null;
 }
Example #3
0
 // 普通方法
 public static String getName(int type) {
   for (PAY c : PAY.values()) {
     if (c.getType() == type) {
       return c.name;
     }
   }
   return null;
 }