private GribCollectionProto.Dataset writeDatasetProto(GribCollectionImmutable.Type type,
      List<Group> groups) {
    GribCollectionProto.Dataset.Builder b = GribCollectionProto.Dataset.newBuilder();

    GribCollectionProto.Dataset.Type ptype = GribCollectionProto.Dataset.Type
        .valueOf(type.toString());
    b.setType(ptype);

    for (Group group : groups) {
      b.addGroups(writeGroupProto(group));
    }

    return b.build();
  }
private GribCollectionProto.Dataset writeDatasetProto(GribCollectionImmutable.Type type,
      List<Group> groups) {
    GribCollectionProto.Dataset.Builder b = GribCollectionProto.Dataset.newBuilder();

    GribCollectionProto.Dataset.Type ptype = GribCollectionProto.Dataset.Type
        .valueOf(type.toString());
    b.setType(ptype);

    for (Group group : groups) {
      b.addGroups(writeGroupProto(group));
    }

    return b.build();
  }
private GribCollectionProto . Dataset writeDatasetProto ( GribCollectionImmutable . Type type , List < Group > groups ) { GribCollectionProto . Dataset . Builder b = GribCollectionProto . Dataset . newBuilder ( ) ; GribCollectionProto . Dataset . Type ptype = GribCollectionProto . Dataset . Type . valueOf ( type . toString ( ) ) ; b . setType ( ptype ) ; for ( Group group : groups ) { b . addGroups ( writeGroupProto ( group ) ) ; } return b . build ( ) ; }
/*
message Dataset {
Type type = 1;
repeated Group groups = 2;
/ * message Dataset { Type type = 1 ; repeated Group groups = 2 ;