示例#1
0
 /**
  * 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;
 }
示例#2
0
 /**
  * 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;
 }
示例#3
0
 /**
  * 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;
 }
示例#4
0
 /**
  * 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;
 }
示例#5
0
 /** @return */
 public static int count() {
   return MainStat.values().length;
 }