@Override public List<Source> descendants() { List<Source> descendants = new ArrayList<>(); for (int i = 0; i < sources.size(); i++) { DynamicNode dynamicNode = sources.get(i); for (DynamicNode.RenderedNode rendered : dynamicNode.render(Collections.emptyMap(), potentials)) { descendants.add(new RenderedSource(rendered.variablesUsed(), sources, potentials, i)); } } return descendants; }
@Override public List<Source> descendants() { List<Source> descendants = new ArrayList<>(); for (int i = index; i < sources.size(); i++) { DynamicNode dynamicNode = sources.get(i); if (dynamicNode.variables().containsAll(variables.keySet())) { List<DynamicNode.RenderedNode> rendered = dynamicNode.render(variables, potentials); for (DynamicNode.RenderedNode source : rendered) { Map<String, String> descendantVars = new HashMap<>(variables); descendantVars.putAll(source.variablesUsed()); descendants.add(new RenderedSource(descendantVars, sources, potentials, i)); } } } return descendants; }
@Override public String path() { return rendered.path(); }