Package org.nuxeo.osgi.util
Class FileIterator
- java.lang.Object
-
- org.nuxeo.osgi.util.FileIterator
-
- All Implemented Interfaces:
Enumeration<File>
,Iterator<File>
public class FileIterator extends Object implements Iterator<File>, Enumeration<File>
- Author:
- Bogdan Stefanescu
-
-
Constructor Summary
Constructors Constructor Description FileIterator(File file)
FileIterator(File file, FileFilter filter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Enumeration<URL>
asUrlEnumeration(Iterator<File> it)
static Iterator<URL>
asUrlIterator(Iterator<File> it)
void
feed(File file)
Feed the iterator with the given directory content if anyboolean
getSkipDirs()
boolean
hasMoreElements()
Enumeration APIboolean
hasNext()
File
next()
File
nextElement()
void
remove()
void
setSkipDirs(boolean skipDirs)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
filter
protected FileFilter filter
-
file
protected File file
-
skipDirs
protected boolean skipDirs
-
-
Constructor Detail
-
FileIterator
public FileIterator(File file)
-
FileIterator
public FileIterator(File file, FileFilter filter)
-
-
Method Detail
-
asUrlEnumeration
public static Enumeration<URL> asUrlEnumeration(Iterator<File> it)
-
setSkipDirs
public void setSkipDirs(boolean skipDirs)
-
getSkipDirs
public boolean getSkipDirs()
-
feed
public void feed(File file)
Feed the iterator with the given directory content if any
-
hasMoreElements
public boolean hasMoreElements()
Enumeration API- Specified by:
hasMoreElements
in interfaceEnumeration<File>
-
nextElement
public File nextElement()
- Specified by:
nextElement
in interfaceEnumeration<File>
-
-