Package org.apache.tools.ant.types

# Interface ResourceCollection

All Superinterfaces:
  `Iterable<Resource>`

All Known Subinterfaces:
  `AppendableResourceCollection`

All Known Implementing Classes:
  `AbstractClasspathResource`, `AbstractResourceCollectionWrapper`, `AllButFirst`, `AllButLast`, `ArchiveFileSet`, `ArchiveResource`, `Archives`, `BaseResourceCollectionContainer`, `BaseResourceCollectionWrapper`, `BCFileSet`, `BZip2Resource`, `ClassfileSet`, `CompressedResource`, `Concat`, `ContentTransformingResource`, `Difference`, `DirSet`, `FileList`, `FileResource`, `Files`, `FileSet`, `First`, `GZipResource`, `Intersect`, `JavaConstantResource`, `Javadoc.TagArgument`, `JavaResource`, `Last`, `LazyResourceCollectionWrapper`, `LibFileSet`, `LogOutputResource`, `MappedResource`, `MappedResourceCollection`, `MultiRootFileSet`, `Path`, `Path.PathElement`, `PropertyResource`, `PropertySet`, `Resource`, `ResourceDecorator`, `ResourceList`, `Resources`, `Restrict`, `SizeLimitCollection`, `Sort`, `StringResource`, `Tar.TarFileSet`, `TarFileSet`, `TarResource`, `Tokens`, `Union`, `URLResource`, `XzResource`, `ZipFileSet`, `ZipResource`

public interface ResourceCollection extends Iterable<Resource>
Interface describing a collection of Resources.

Since:
  Ant 1.7

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default boolean`
  `isEmpty()`
  Learn whether this `ResourceCollection` is empty.
  `boolean`
  `isFilesystemOnly()`
  Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions.
  `int`
  `size()`
  Learn the number of contained Resources.
  `default Stream<? extends Resource>`
  `stream()`
  Return a `Stream` over this `ResourceCollection`.

  ### Methods inherited from interface java.lang.Iterable

  `forEach, iterator, spliterator`

- ## Method Details

  - ### size

    int size()
    Learn the number of contained Resources.
    Returns:
      number of elements as int.

  - ### isFilesystemOnly

    boolean isFilesystemOnly()
    Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. If true, all resources returned from this collection should respond with a `FileProvider` when asked via `Resource.as(java.lang.Class<T>)`.
    Returns:
      whether this is a filesystem-only resource collection.

  - ### stream

    default Stream<? extends Resource> stream()
    Return a `Stream` over this `ResourceCollection`.
    Returns:
      `Stream` of `Resource`
    Since:
      Ant 1.10.2

  - ### isEmpty

    default boolean isEmpty()
    Learn whether this `ResourceCollection` is empty.
    Returns:
      boolean