Now, FileIteratorState implements Iterator<File>.
This commit is contained in:
parent
fb42e17c49
commit
1d832b29de
1 changed files with 13 additions and 1 deletions
|
@ -1,12 +1,13 @@
|
||||||
package fr.devinsy.util;
|
package fr.devinsy.util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FileIteratorState
|
public class FileIteratorState implements Iterator<File>
|
||||||
{
|
{
|
||||||
protected File[] files;
|
protected File[] files;
|
||||||
protected int currentIndex;
|
protected int currentIndex;
|
||||||
|
@ -107,6 +108,7 @@ public class FileIteratorState
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasNext()
|
public boolean hasNext()
|
||||||
{
|
{
|
||||||
boolean result;
|
boolean result;
|
||||||
|
@ -129,6 +131,7 @@ public class FileIteratorState
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public File next()
|
public File next()
|
||||||
{
|
{
|
||||||
File result;
|
File result;
|
||||||
|
@ -138,5 +141,14 @@ public class FileIteratorState
|
||||||
|
|
||||||
//
|
//
|
||||||
return(result);
|
return(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void remove()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue