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