Methods Summary |
---|
public void | add(org.apache.tools.ant.types.ResourceCollection r)Add the ResourceCollection to count.
if (rc != null) {
throw new BuildException(ONE_NESTED_MESSAGE);
}
rc = r;
|
public boolean | eval()Fulfill the condition contract.
if (rc == null) {
throw new BuildException(ONE_NESTED_MESSAGE);
}
if (count == null) {
throw new BuildException(COUNT_REQUIRED);
}
return when.evaluate(new Integer(rc.size()).compareTo(count));
|
public void | execute()Execute as a Task.
if (rc == null) {
throw new BuildException(ONE_NESTED_MESSAGE);
}
if (property == null) {
log("resource count = " + rc.size());
} else {
getProject().setNewProperty(property, Integer.toString(rc.size()));
}
|
public void | setCount(int c)Set the target count number for use as a Condition.
count = new Integer(c);
|
public void | setProperty(java.lang.String p)Set the name of the property to set in task mode.
property = p;
|
public void | setRefid(org.apache.tools.ant.types.Reference r)Set the ResourceCollection reference.
Object o = r.getReferencedObject();
if (!(o instanceof ResourceCollection)) {
throw new BuildException(r.getRefId()
+ " doesn\'t denote a ResourceCollection");
}
add((ResourceCollection) o);
|
public void | setWhen(org.apache.tools.ant.types.Comparison c)Set the comparison for use as a Condition.
when = c;
|