Top Description Fields Constructors Methods
org.apache.tools.ant.types.resources

public Class FileResourceIterator

extends Object
implements Iterator<Resource>
Class Inheritance
All Implemented Interfaces
java.util.Iterator
Imports
java.io.File, java.util.Iterator, .NoSuchElementException, org.apache.tools.ant.Project, org.apache.tools.ant.types.Resource

Iterator of FileResources from filenames.
Since
Ant 1.7

Field Summary

Modifier and TypeField and Description
private File
private String[]
private int
private Project

Constructor Summary

AccessConstructor and Description
public
FileResourceIterator()

Construct a new FileResourceIterator.
public
FileResourceIterator(Project
associated Project instance
project
)

Create a new FileResourceIterator.

public
FileResourceIterator(File
the base directory of this instance.
basedir
)

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

Construct a new FileResourceIterator relative to the specified base directory.

public
FileResourceIterator(File
the base directory of this instance.
basedir
,
String[]
the String[] of filenames.
filenames
)

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

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

Method Summary

Modifier and TypeMethod and Description
public void
addFiles(String[]
the filenames to add.
s
)

Add an array of filenames to this FileResourceIterator.

public boolean

Returns:

whether there are more Resources to iterate over.
hasNext
()

Implements java.util.Iterator.hasNext.

Find out whether this FileResourceIterator has more elements.
public Resource

Returns:

the next Object.
next
()

Implements java.util.Iterator.next.

Get the next element from this FileResourceIterator.
public FileResource

Returns:

the next File.
nextResource
()

Convenience method to return the next resource.

public void
remove()

Overrides default java.util.Iterator.remove.

Not implemented.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

basedirback to summary
private File basedir
filesback to summary
private String[] files
posback to summary
private int pos
projectback to summary
private Project project

Constructor Detail

FileResourceIteratorback to summary
public FileResourceIterator()

Construct a new FileResourceIterator.

Annotations
@Deprecated
FileResourceIteratorback to summary
public FileResourceIterator(Project project)

Create a new FileResourceIterator.

Parameters
project:Project

associated Project instance

Since
Ant 1.8
FileResourceIteratorback to summary
public FileResourceIterator(File basedir)

Construct a new FileResourceIterator relative to the specified base directory.

Parameters
basedir:File

the base directory of this instance.

Annotations
@Deprecated
FileResourceIteratorback to summary
public FileResourceIterator(Project project, File basedir)

Construct a new FileResourceIterator relative to the specified base directory.

Parameters
project:Project

associated Project instance

basedir:File

the base directory of this instance.

Since
Ant 1.8
FileResourceIteratorback to summary
public FileResourceIterator(File basedir, String[] filenames)

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

Parameters
basedir:File

the base directory of this instance.

filenames:String[]

the String[] of filenames.

Annotations
@Deprecated
FileResourceIteratorback to summary
public FileResourceIterator(Project project, File basedir, String[] filenames)

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

Parameters
project:Project

associated Project instance

basedir:File

the base directory of this instance.

filenames:String[]

the String[] of filenames.

Since
Ant 1.8

Method Detail

addFilesback to summary
public void addFiles(String[] s)

Add an array of filenames to this FileResourceIterator.

Parameters
s:String[]

the filenames to add.

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Find out whether this FileResourceIterator has more elements.

Returns:boolean

whether there are more Resources to iterate over.

Annotations
@Override
nextback to summary
public Resource next()

Implements java.util.Iterator.next.

Get the next element from this FileResourceIterator.

Returns:Resource

the next Object.

Annotations
@Override
nextResourceback to summary
public FileResource nextResource()

Convenience method to return the next resource.

Returns:FileResource

the next File.

removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Not implemented.

Annotations
@Override