public ChangesRequiringRestart compareArray(List<? extends Node> from,
                                                List<? extends Node> to,
                                                String name,
                                                String comment,
                                                CompareFunc func) {
        if (!from.equals(to)) {
            int commonElements = Math.min(from.size(), to.size());
            for (int i = 0; i < commonElements; ++i) {
                ChangesRequiringRestart childReport = func.getChangesRequiringRestart(from.get(i), to.get(i));
                String prefix = childReport.componentName + "[" + i + "]";
                mergeChanges(prefix, childReport);
            }
            for (int i = commonElements; i < from.size(); ++i) {
                report.add(new ReportLine(name + "[" + i + "]", from.get(i), null, comment));
            }
            for (int i = commonElements; i < to.size(); ++i) {
                report.add(new ReportLine(name + "[" + i + "]", null, to.get(i), comment));
            }
        }
        return this;
    }
Interface used to pass lambda functions from generated code to compareArray/-Map functions.
config-lib/src/main/java/com/yahoo/config/ChangesRequiringRestart.java