List<RatedResolveResult> (List<RatedResolveResult> targets) { if (targets.size() == 1) { return targets; } List<RatedResolveResult> ret = new SortedList<>((one, another) -> another.getRate() - one.getRate()); ret.addAll(targets); return ret; }