Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 5
0
 /** @return */
 public static int count() {
   return MainStat.values().length;
 }