org.apache.tools.ant.taskdefs
Class ResourceCount
- Cloneable, Condition
public class ResourceCount
Count resources from a ResourceCollection, storing to a property or
writing to the log. Can also be used as a Condition.
void | add(ResourceCollection r) - Add the ResourceCollection to count.
|
boolean | eval() - Fulfill the condition contract.
|
void | execute() - Execute as a Task.
|
void | setCount(int c) - Set the target count number for use as a Condition.
|
void | setProperty(String p) - Set the name of the property to set in task mode.
|
void | setRefid(Reference r) - Set the ResourceCollection reference.
|
void | setWhen(Comparison c) - Set the comparison for use as a Condition.
|
bindToOwner , execute , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , log , log , maybeConfigure , perform , reconfigure , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
add
public void add(ResourceCollection r)
Add the ResourceCollection to count.
r
- the ResourceCollection to count.
eval
public boolean eval()
Fulfill the condition contract.
- eval in interface Condition
- true if the specified ResourceCollection satisfies the set criteria.
execute
public void execute()
Execute as a Task.
- execute in interface Task
setCount
public void setCount(int c)
Set the target count number for use as a Condition.
c
- number of Resources as int.
setProperty
public void setProperty(String p)
Set the name of the property to set in task mode.
p
- the property name to set.
setRefid
public void setRefid(Reference r)
Set the ResourceCollection reference.
setWhen
public void setWhen(Comparison c)
Set the comparison for use as a Condition.
c
- Comparison (an EnumeratedAttribute) When.