List<LayoutFileSet> (TempFileFactory temp) { Set<LayoutFileSet> result = new LinkedHashSet<>(); for (Content child : children) { for (LayoutFileSet set : child.build(temp)) { result.add(createCopy(set)); } } ArrayList<LayoutFileSet> list = new ArrayList<>(result); for (LayoutFileSet set : list) { if (includes != null) { set.setIncludes(includes); } if (excludes != null) { set.setExcludes(excludes); } } return list; }