@ Override public void apply ( TreeVisitor tp ) { for ( int i = 0 , size = parseTrees . size ( ) ; i < size ; i ++ ) { tp . visitTree ( parseTrees . get ( i ) ) ; } // or could do as Iterator but slower // Iterator iter = parseTrees.iterator(); // while (iter.hasNext()) { // tp.visitTree((Tree) iter.next()); // } }
Apply the TreeVisitor tp to all trees in the Treebank .