T () { T dependency = myToProcess.removeFirst(); if (mySeenObjects.add(dependency)) { Collection<? extends T> children = getChildren(dependency); myToProcess.addAll(children); myProcessedStructure.add(children.size()); return dependency; } else { return next(); } }