List<Line> (@NotNull List<? extends Line> original, @NotNull ComparisonPolicy policy) { List<Line> result = new ArrayList<>(original.size()); for (Line line : original) { Line newLine = line.myPolicy != policy ? new Line(line.getContent(), policy) : line; result.add(newLine); } return result; }