**/\r
package org.tianocore.migration;\r
\r
+import java.io.File;\r
import java.util.*;\r
\r
public final class PathIterator implements Common.ForDoAll {\r
-// this PathIterator is based on HashSet, an thread implementation is required.\r
- PathIterator(String path, int md) throws Exception {\r
- startpath = path;\r
- mode = md;\r
- Common.toDoAll(startpath, this, mode);\r
- it = pathlist.iterator();\r
- }\r
- private String startpath = null;\r
- private int mode;\r
- private HashSet<String> pathlist = new HashSet<String>();\r
- private Iterator<String> it = null;\r
+// this PathIterator is based on HashSet, an thread implementation is required.\r
+ PathIterator(String path, int md) throws Exception {\r
+ startpath = path;\r
+ mode = md;\r
+ Common.toDoAll(startpath, this, mode);\r
+ it = pathlist.iterator();\r
+ }\r
+ private String startpath = null;\r
+ private int mode;\r
+ private HashSet<String> pathlist = new HashSet<String>();\r
+ private Iterator<String> it = null;\r
\r
- public final void run(String path) throws Exception {\r
- pathlist.add(path);\r
- }\r
+ public final void run(String path) throws Exception {\r
+ pathlist.add(path);\r
+ }\r
\r
- public final String next() {\r
- return it.next();\r
- }\r
+ public boolean filter(File dir) {\r
+ return true;\r
+ }\r
+ \r
+ public final String next() {\r
+ return it.next();\r
+ }\r
\r
- public final boolean hasNext() {\r
- return it.hasNext();\r
- }\r
+ public final boolean hasNext() {\r
+ return it.hasNext();\r
+ }\r
\r
- public final String toString() {\r
- return pathlist.toString();\r
- }\r
- \r
- public boolean dirFilter(String filepath) {\r
- return true;\r
- }\r
- \r
- public boolean fileFilter(String filepath) {\r
- return true;\r
- }\r
+ public final String toString() {\r
+ return pathlist.toString();\r
+ }\r
}\r