added iterable implementation in KeyList

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7891 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 22d69a6368
commit 41a8ee4569

@ -31,6 +31,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.RandomAccessFile;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.zip.GZIPInputStream;
@ -43,7 +44,7 @@ import net.yacy.cora.document.UTF8;
* which is done by extending the file with just another line.
* When is key list file is initialized, all lines are read and pushed into a java set
*/
public class KeyList {
public class KeyList implements Iterable<String> {
private static final Object _obj = new Object();
@ -109,4 +110,9 @@ public class KeyList {
}
@Override
public Iterator<String> iterator() {
return this.keys.keySet().iterator();
}
}

Loading…
Cancel
Save