docs: public int getIndex(String name) {
      Integer index = nameIndex.get(name);
      if (index == null) {
        throw new IllegalArgumentException("Field with name '" + name + "' was not found");
      }
      return index;
    }