protected Iterator<TreeDataModelTuple> delegate() {
if (iterator == null) {
List<Iterator<TreeDataModelTuple>> list = Lists.newArrayList();
if (component instanceof TreeModelRecursiveAdaptor) {
TreeModelRecursiveAdaptor parentRecursiveAdaptor = (TreeModelRecursiveAdaptor) component;
Object nodes = parentRecursiveAdaptor.getNodes();
Iterator<TreeDataModelTuple> tuplesIterator = createTuplesIterator(component, nodes);
if (tuplesIterator != null) {
list.add(tuplesIterator);
}
}
if (component.getChildCount() > 0) {
for (UIComponent child : Iterables.filter(component.getChildren(), ComponentPredicates.isRendered())) {
Object nodes = null;
if (child instanceof TreeModelRecursiveAdaptor) {
TreeModelRecursiveAdaptor treeModelRecursiveAdaptor = (TreeModelRecursiveAdaptor) child;
nodes = treeModelRecursiveAdaptor.getRoots();
} else if (child instanceof TreeModelAdaptor) {
TreeModelAdaptor treeModelAdaptor = (TreeModelAdaptor) child;
nodes = treeModelAdaptor.getNodes();
}