Methods Summary |
---|
protected java.util.Collection | getCollection()Unify the contained Resources.
return getCollection(false);
|
protected java.util.Collection | getCollection(boolean asString)Unify the contained Resources.
List rc = getResourceCollections();
if (rc.isEmpty()) {
return Collections.EMPTY_LIST;
}
//preserve order-encountered using a list; enforce set logic manually:
ArrayList union = new ArrayList(rc.size() * 2);
for (Iterator rcIter = rc.iterator(); rcIter.hasNext();) {
for (Iterator r = nextRC(rcIter).iterator(); r.hasNext();) {
Object o = r.next();
if (asString) {
o = o.toString();
}
if (!(union.contains(o))) {
union.add(o);
}
}
}
return union;
|
public static org.apache.tools.ant.types.resources.Union | getInstance(org.apache.tools.ant.types.ResourceCollection rc)Static convenience method to union an arbitrary set of Resources.
return rc instanceof Union ? (Union) rc : new Union(rc);
|
public java.lang.String[] | list()Returns all Resources in String format. Provided for
convenience in implementing Path.
if (isReference()) {
return ((Union) getCheckedRef()).list();
}
Collection result = getCollection(true);
return (String[]) (result.toArray(new String[result.size()]));
|
public org.apache.tools.ant.types.Resource[] | listResources()Convenience method.
if (isReference()) {
return ((Union) getCheckedRef()).listResources();
}
Collection result = getCollection();
return (Resource[]) (result.toArray(new Resource[result.size()]));
|
private static org.apache.tools.ant.types.ResourceCollection | nextRC(java.util.Iterator i)
return (ResourceCollection) i.next();
|