use of com.epam.ta.reportportal.entity.widget.content.healthcheck.HealthCheckTableStatisticsContent in project commons-dao by reportportal.
the class HealthCheckTableChain method concat.
private List<HealthCheckTableContent> concat(boolean contentFirst, Map<String, HealthCheckTableStatisticsContent> content, Map<String, List<String>> columnMapping) {
List<HealthCheckTableContent> result = Lists.newArrayListWithExpectedSize(content.size());
if (contentFirst) {
content.forEach((key, statistics) -> {
HealthCheckTableContent resultEntry = entryFromStatistics(key, statistics);
ofNullable(columnMapping.get(key)).ifPresent(resultEntry::setCustomValues);
result.add(resultEntry);
});
} else {
columnMapping.forEach((key, attributes) -> {
HealthCheckTableContent resultEntry = ofNullable(content.remove(key)).map(statisticsContent -> entryFromStatistics(key, statisticsContent)).orElseGet(HealthCheckTableContent::new);
resultEntry.setCustomValues(attributes);
result.add(resultEntry);
});
content.forEach((key, statistics) -> result.add(entryFromStatistics(key, statistics)));
}
return result;
}
Aggregations