org.apache.tools.ant.types.resources

Class FileResourceIterator

public class FileResourceIterator extends Object implements Iterator

Iterator of FileResources from filenames.

Since: Ant 1.7

Constructor Summary
FileResourceIterator()
Construct a new FileResourceIterator.
FileResourceIterator(Project project)
Create a new FileResourceIterator.
FileResourceIterator(File basedir)
Construct a new FileResourceIterator relative to the specified base directory.
FileResourceIterator(Project project, File basedir)
Construct a new FileResourceIterator relative to the specified base directory.
FileResourceIterator(File basedir, String[] filenames)
Construct a new FileResourceIterator over the specified filenames, relative to the specified base directory.
FileResourceIterator(Project project, File basedir, String[] filenames)
Construct a new FileResourceIterator over the specified filenames, relative to the specified base directory.
Method Summary
voidaddFiles(String[] s)
Add an array of filenames to this FileResourceIterator.
booleanhasNext()
Find out whether this FileResourceIterator has more elements.
Objectnext()
Get the next element from this FileResourceIterator.
FileResourcenextResource()
Convenience method to return the next resource.
voidremove()
Not implemented.

Constructor Detail

FileResourceIterator

public FileResourceIterator()

Deprecated: in favor of FileResourceIterator

Construct a new FileResourceIterator.

FileResourceIterator

public FileResourceIterator(Project project)
Create a new FileResourceIterator.

Parameters: project associated Project instance

Since: Ant 1.8

FileResourceIterator

public FileResourceIterator(File basedir)

Deprecated: in favor of FileResourceIterator

Construct a new FileResourceIterator relative to the specified base directory.

Parameters: basedir the base directory of this instance.

FileResourceIterator

public FileResourceIterator(Project project, File basedir)
Construct a new FileResourceIterator relative to the specified base directory.

Parameters: project associated Project instance basedir the base directory of this instance.

Since: Ant 1.8

FileResourceIterator

public FileResourceIterator(File basedir, String[] filenames)

Deprecated: in favor of (Project, File, String[])

Construct a new FileResourceIterator over the specified filenames, relative to the specified base directory.

Parameters: basedir the base directory of this instance. filenames the String[] of filenames.

FileResourceIterator

public FileResourceIterator(Project project, File basedir, String[] filenames)
Construct a new FileResourceIterator over the specified filenames, relative to the specified base directory.

Parameters: project associated Project instance basedir the base directory of this instance. filenames the String[] of filenames.

Since: Ant 1.8

Method Detail

addFiles

public void addFiles(String[] s)
Add an array of filenames to this FileResourceIterator.

Parameters: s the filenames to add.

hasNext

public boolean hasNext()
Find out whether this FileResourceIterator has more elements.

Returns: whether there are more Resources to iterate over.

next

public Object next()
Get the next element from this FileResourceIterator.

Returns: the next Object.

nextResource

public FileResource nextResource()
Convenience method to return the next resource.

Returns: the next File.

remove

public void remove()
Not implemented.