]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/MigrationTools/org/tianocore/migration/PathIterator.java
1. Fix EDKT214 "Framework Wizard is not synchronized with FrameworkDatabase.db when...
[mirror_edk2.git] / Tools / Source / MigrationTools / org / tianocore / migration / PathIterator.java
1 package org.tianocore.migration;
2
3 import java.util.*;
4
5 public final class PathIterator implements Common.ForDoAll {
6 // this PathIterator is based on HashSet, an thread implementation is required.
7 PathIterator(String path, int md) throws Exception {
8 startpath = path;
9 mode = md;
10 Common.toDoAll(startpath, this, mode);
11 it = pathlist.iterator();
12 }
13 private String startpath = null;
14 private int mode;
15 private HashSet<String> pathlist = new HashSet<String>();
16 private Iterator<String> it = null;
17
18 public final void toDo(String path) throws Exception {
19 pathlist.add(path);
20 }
21
22 public final String next() {
23 return it.next();
24 }
25
26 public final boolean hasNext() {
27 return it.hasNext();
28 }
29
30 public final String toString() {
31 return pathlist.toString();
32 }
33 }