import static java.util.Comparator.comparing; xxx.stream().sorted( comparing(DataSummaryReportTemplate::getDisplayOrder) .thenComparing(DataSummaryReportTemplate::getMetricId)).collect(toList());
import static java.util.Comparator.comparing; xxx.stream().sorted( comparing(DataSummaryReportTemplate::getDisplayOrder) .thenComparing(DataSummaryReportTemplate::getMetricId)).collect(toList());