DefaultScanner implements Scanner { public Iterator<Scanned> iterator () { if(scanFiles == null){ scanFiles = new LinkedList<Scanned>(); walkFiles(scanFiles, newDir); } return scanFiles.iterator(); } DefaultScanner(File oldDir, File newDir); Iterator<Scanned> iterator();  }
@Test public void test_call(){ Scanner scanner = new DefaultScanner( new File("D:\\0000_test\\abacus-annotation"), new File("D:\\0005_git\\abacus\\abacus-annotation") ); Iterator<Scanned> it = scanner.iterator(); while(it.hasNext()){ System.out.println(it.next()); } }