protected static int getIndexForType(int[] types, int type) {
public static int getIndexForType(int[] types, int type) {
  protected static int getIndexForType(int[] types, int type) {    for (int ii = 0; ii < types.length; ii++) {      if (types[ii] == type) {        return ii;      }    }    return -1;  }