/** * List of the keys for all stats. * * @return */ public static List<String> keys() { ArrayList<String> ret = new ArrayList<String>(MainStat.values().length); for (MainStat stat : MainStat.values()) { ret.add(stat.getKey()); } return ret; }
/** * Get the statkey for a given code. * * @param c * @return */ public static MainStat getForKey(String c) { for (MainStat key : values()) { if (key.getKey().equalsIgnoreCase(c)) { return key; } } return null; }
/** * Check to see if a given string is a statkey's key. * * @param c * @return */ public static boolean isStatCode(String c) { for (MainStat key : values()) { if (key.getKey().equalsIgnoreCase(c)) { return true; } } return false; }
/** * Get the statkey for a given index. * * @param idx * @return */ public static MainStat getForIndex(int idx) { for (MainStat key : values()) { if (key.getIndex() == idx) { return key; } } return null; }
/** @return */ public static int count() { return MainStat.values().length; }