code: public void add(String key, Object object) {
      int fieldIndex = getIndex(key);
      if (object.getClass() == ParquetGroup.class) {
        this.addGroup(key, (Group) object);
      } else {
        this.add(fieldIndex, (Primitive) object);
      }
    }
docs: Add any object of {@link PrimitiveType} or {@link Group} type with a String key.
  @param key
  @param object