Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.condition

public Class ResourcesMatch

extends Object
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
java.io.IOException, java.util.Iterator, org.apache.tools.ant.BuildException, org.apache.tools.ant.types.Resource, .ResourceCollection, org.apache.tools.ant.types.resources.Union, org.apache.tools.ant.util.ResourceUtils

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

Field Summary

Modifier and TypeField and Description
private boolean
private Union

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(ResourceCollection
the resource collection to add.
rc
)

Add a resource collection.

public boolean

Returns:

true if all resources are equal.
eval
()

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Verify that all resources match.
public void
setAsText(boolean
whether to ignore line endings.
asText
)

Set whether to treat resources as if they were text files, ignoring line endings.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

asTextback to summary
private boolean asText
resourcesback to summary
private Union resources

Constructor Detail

ResourcesMatchback to summary
public ResourcesMatch()

Method Detail

addback to summary
public void add(ResourceCollection rc)

Add a resource collection.

Parameters
rc:ResourceCollection

the resource collection to add.

evalback to summary
public boolean eval() throws BuildException

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Verify that all resources match.

Returns:boolean

true if all resources are equal.

Annotations
@Override
Exceptions
BuildException:
if there is an error.
setAsTextback to summary
public void setAsText(boolean asText)

Set whether to treat resources as if they were text files, ignoring line endings.

Parameters
asText:boolean

whether to ignore line endings.