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