public static ImageApiProfile merge(List<Profile> profiles) {
    return profiles.stream()
        .filter(ImageApiProfile.class::isInstance)
        .map(ImageApiProfile.class::cast)
        .reduce(new ImageApiProfile(), ImageApiProfile::merge);
  }
public static ImageApiProfile merge(List<Profile> profiles) {
    return profiles.stream()
        .filter(ImageApiProfile.class::isInstance)
        .map(ImageApiProfile.class::cast)
        .reduce(new ImageApiProfile(), ImageApiProfile::merge);
  }
public static ImageApiProfile merge ( List < Profile > profiles ) { return profiles . stream ( ) . filter ( ImageApiProfile . class :: isInstance ) . map ( ImageApiProfile . class :: cast ) . reduce ( new ImageApiProfile ( ) , ImageApiProfile :: merge ) ; }
Merge multiple profiles into one. Useful for image servers that want to consolidate the limits given in a info.json.

@param profiles profiles to be merged
@return merged profile
Merge multiple profiles into one . Useful for image servers that want to consolidate the limits given in a info . json .