Package: org.codehaus.groovy.ant

## [Java] Class FileIterator

- org.codehaus.groovy.ant.FileIterator

- All Implemented Interfaces and Traits:
    Iterator

      public class FileIterator
      extends Object
      implements Iterator

  `FileIterator` is an iterator over a number of files from a collection of FileSet instances.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `FileIterator(Project project, Iterator<FileSet> fileSetIterator)` Creates a file iterator that yields files from the supplied file sets.
    `FileIterator(Project project, Iterator<FileSet> fileSetIterator, boolean iterateDirectories)` Creates a file iterator that yields files or directories from the supplied file sets.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public boolean` | `hasNext()` Returns: true if there is another object that matches the given predicate
    `` | `public File` | `next()` Returns: the next object which matches the given predicate
    `` | `public void` | `remove()` throws UnsupportedOperationException

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public FileIterator(Project project, Iterator<FileSet> fileSetIterator)

      Creates a file iterator that yields files from the supplied file sets.

      Parameters:
        `project` - the Ant project used to resolve each file set
        `fileSetIterator` - the file sets to iterate

    - #### public FileIterator(Project project, Iterator<FileSet> fileSetIterator, boolean iterateDirectories)

      Creates a file iterator that yields files or directories from the supplied file sets.

      Parameters:
        `project` - the Ant project used to resolve each file set
        `fileSetIterator` - the file sets to iterate
        `iterateDirectories` - `true` to iterate directories instead of files

  - ### Method Detail

    - #### public boolean hasNext()

      Returns:
        true if there is another object that matches the given predicate

    - #### public File next()

      Returns:
        the next object which matches the given predicate

    - #### public void remove()

      throws UnsupportedOperationException