public static int parse(String s) { for(int i = TERRAIN_FIRST; i <= TERRAIN_LAST; i++) { if(TERRAIN_NAMES[i].equalsIgnoreCase(s)) { return i; } } return -1; }
public static int parse(String name) { for (int i = 0; i < names.length; i++) { if (names[i].equals(name)) { return i; } } return 0; }
     public static int parse(String s) {         for(int i = TERRAIN_FIRST; i <= TERRAIN_LAST; i++) {             if(TERRAIN_NAMES[i].equalsIgnoreCase(s)) {                 return i;             }         }         return -1;     }