ResourcesMatch (Apache Ant API)
Date: 2018-09-12

Package org.apache.tools.ant.taskdefs.condition

## Class ResourcesMatch

- java.lang.Object
- - org.apache.tools.ant.taskdefs.condition.ResourcesMatch

- All Implemented Interfaces:
    `Condition`

      public class ResourcesMatch
      extends java.lang.Object
      implements Condition

  Compares resources for equality based on size and content. All resources specified must match; no resource collections specified is an error condition; if resource collections are specified, but yield fewer than two elements, the condition evaluates to `true`.
  Since:
    Ant 1.7

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResourcesMatch()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `add​(ResourceCollection rc)` | Add a resource collection.
    `boolean` | `eval()` | Verify that all resources match.
    `void` | `setAsText​(boolean asText)` | Set whether to treat resources as if they were text files, ignoring line endings.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourcesMatch

          public ResourcesMatch()

  - ### Method Detail

    - #### setAsText

          public void setAsText​(boolean asText)

      Set whether to treat resources as if they were text files, ignoring line endings.
      Parameters:
        `asText` - whether to ignore line endings.

    - #### add

          public void add​(ResourceCollection rc)

      Add a resource collection.
      Parameters:
        `rc` - the resource collection to add.

    - #### eval

          public boolean eval()
                       throws BuildException

      Verify that all resources match.
      Specified by:
        `eval` in interface `Condition`
      Returns:
        true if all resources are equal.
      Throws:
        `BuildException` - if there is an error.