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 totrue.- Since:
- Ant 1.7
 
- 
- 
Constructor SummaryConstructors Constructor Description ResourcesMatch()
 - 
Method SummaryModifier and Type Method Description voidadd(ResourceCollection rc)Add a resource collection.booleaneval()Verify that all resources match.voidsetAsText(boolean asText)Set whether to treat resources as if they were text files, ignoring line endings.
 
- 
- 
- 
Method Detail- 
setAsTextpublic 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.
 
 - 
addpublic void add(ResourceCollection rc) Add a resource collection.- Parameters:
- rc- the resource collection to add.
 
 - 
evalpublic boolean eval() throws BuildExceptionVerify that all resources match.- Specified by:
- evalin interface- Condition
- Returns:
- true if all resources are equal.
- Throws:
- BuildException- if there is an error.
 
 
- 
 
-