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 .