class CompositeBuildResult implements AnalysisBuildResult {

    public CompositeBuildResult add(final AnalysisBuildResult... additionalResults) {
        for (AnalysisBuildResult another : additionalResults) {
            sizesPerOrigin.putAll(another.getSizePerOrigin());
            for (Severity severity : Severity.getPredefinedValues()) {
                sizesPerSeverity.merge(severity, another.getTotalSizeOf(severity), Integer::sum);
                newSizesPerSeverity.merge(severity, another.getNewSizeOf(severity), Integer::sum);
            }
            fixedSize += another.getFixedSize();
        }
        return this;
    }

}