private void loadAllInstances ( ZooClassProxy def , boolean subClasses , MergingIterator < ZooPC > iter , boolean loadFromCache ) { for ( Node n : nodes ) { iter . add ( n . loadAllInstances ( def , loadFromCache ) ) ; } if ( subClasses ) { for ( ZooClassProxy sub : def . getSubProxies ( ) ) { loadAllInstances ( sub , true , iter , loadFromCache ) ; } } }
This method avoids nesting MergingIterators .