Class Union
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.types.DataType
- 
- org.apache.tools.ant.types.resources.BaseResourceCollectionContainer
- 
- org.apache.tools.ant.types.resources.Union
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- java.lang.Iterable<Resource>,- ResourceCollection
 
 public class Union extends BaseResourceCollectionContainer ResourceCollection representing the union of multiple nested ResourceCollections.- Since:
- Ant 1.7
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description Union()Default constructor.Union(Project project)Create a new Union.Union(Project project, ResourceCollection rc)Convenience constructor.Union(ResourceCollection rc)Convenience constructor.
 - 
Method SummaryModifier and Type Method Description protected java.util.Set<Resource>getAllResources()Get the unified set of contained Resources.protected java.util.Collection<java.lang.String>getAllToStrings()Get a collection of strings representing the unified resource set (strings may duplicate).protected java.util.Collection<Resource>getCollection()Unify the contained Resources.protected <T> java.util.Collection<T>getCollection(boolean asString)Deprecated.static UniongetInstance(ResourceCollection rc)Static convenience method to union an arbitrary set of Resources.java.lang.String[]list()Returns all Resources in String format.Resource[]listResources()Convenience method.- 
Methods inherited from class org.apache.tools.ant.types.resources.BaseResourceCollectionContaineradd, addAll, clear, clone, dieOnCircularReference, getResourceCollections, isCache, isFilesystemOnly, iterator, setCache, size, toString
 - 
Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
 
- 
 
- 
- 
- 
Constructor Detail- 
Unionpublic Union() Default constructor.
 - 
Unionpublic Union(Project project) Create a new Union.- Parameters:
- project- owning Project
 
 - 
Unionpublic Union(ResourceCollection rc) Convenience constructor.- Parameters:
- rc- the ResourceCollection to add.
 
 - 
Unionpublic Union(Project project, ResourceCollection rc) Convenience constructor.- Parameters:
- project- owning Project
- rc- the ResourceCollection to add.
 
 
- 
 - 
Method Detail- 
getInstancepublic static Union getInstance(ResourceCollection rc) Static convenience method to union an arbitrary set of Resources.- Parameters:
- rc- a ResourceCollection.
- Returns:
- a Union.
 
 - 
listpublic java.lang.String[] list() Returns all Resources in String format. Provided for convenience in implementing Path.- Returns:
- String array of Resources.
 
 - 
listResourcespublic Resource[] listResources() Convenience method.- Returns:
- Resource[]
 
 - 
getCollectionprotected java.util.Collection<Resource> getCollection() Unify the contained Resources.- Specified by:
- getCollectionin class- BaseResourceCollectionContainer
- Returns:
- a Collection of Resources.
 
 - 
getCollection@Deprecated protected <T> java.util.Collection<T> getCollection(boolean asString) Deprecated.Unify the contained Resources.- Type Parameters:
- T- resource type
- Parameters:
- asString- indicates whether the resulting Collection should contain Strings instead of Resources.
- Returns:
- a Collection of Resources.
 
 - 
getAllToStringsprotected java.util.Collection<java.lang.String> getAllToStrings() Get a collection of strings representing the unified resource set (strings may duplicate).- Returns:
- Collection<String>
 
 - 
getAllResourcesprotected java.util.Set<Resource> getAllResources() Get the unified set of contained Resources.- Returns:
- Set<Resource>
 
 
- 
 
-