Methods Summary |
---|
public synchronized void | add(org.apache.tools.ant.types.resources.comparators.ResourceComparator c)Add a ResourceComparator to this Sort ResourceCollection.
If multiple ResourceComparators are added, they will be processed in LIFO order.
if (isReference()) {
throw noChildrenAllowed();
}
comp.add(c);
FailFast.invalidate(this);
|
protected synchronized void | dieOnCircularReference(java.util.Stack stk, org.apache.tools.ant.Project p)Overrides the BaseResourceCollectionContainer version
to recurse on nested ResourceComparators.
if (isChecked()) {
return;
}
if (isReference()) {
super.dieOnCircularReference(stk, p);
} else {
DataType.invokeCircularReferenceCheck(comp, stk, p);
setChecked(true);
}
|
protected synchronized java.util.Collection | getCollection()Sort the contained elements.
ResourceCollection rc = getResourceCollection();
Iterator iter = rc.iterator();
if (!(iter.hasNext())) {
return Collections.EMPTY_SET;
}
SortedBag b = new SortedBag(comp);
while (iter.hasNext()) {
b.add(iter.next());
}
return b;
|