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:
- Cloneable,- Iterable<Resource>,- ResourceCollection,- AppendableResourceCollection
ResourceCollection representing the union of multiple nested ResourceCollections.
- Since:
- Ant 1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructorsConstructorDescriptionUnion()Default constructor.Create a new Union.Union(Project project, ResourceCollection rc) Convenience constructor.Convenience constructor.
- 
Method SummaryModifier and TypeMethodDescriptionGet the unified set of contained Resources.protected Collection<String> Get a collection of strings representing the unified resource set (strings may duplicate).protected Collection<Resource> Unify the contained Resources.protected <T> Collection<T> getCollection(boolean asString) Deprecated.static UnionStatic convenience method to union an arbitrary set of Resources.String[]list()Returns all Resources in String format.Resource[]Convenience method.Methods inherited from class org.apache.tools.ant.types.resources.BaseResourceCollectionContaineradd, addAll, clear, clone, dieOnCircularReference, getResourceCollections, isCache, isFilesystemOnly, iterator, setCache, size, toStringMethods 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, tooManyAttributesMethods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
- 
Constructor Details- 
Unionpublic Union()Default constructor.
- 
Union
- 
UnionConvenience constructor.- Parameters:
- rc- the ResourceCollection to add.
 
- 
UnionConvenience constructor.- Parameters:
- project- owning Project
- rc- the ResourceCollection to add.
 
 
- 
- 
Method Details- 
getInstanceStatic convenience method to union an arbitrary set of Resources.- Parameters:
- rc- a ResourceCollection.
- Returns:
- a Union.
 
- 
listReturns all Resources in String format. Provided for convenience in implementing Path.- Returns:
- String array of Resources.
 
- 
listResources
- 
getCollectionUnify the contained Resources.- Specified by:
- getCollectionin class- BaseResourceCollectionContainer
- Returns:
- a Collection of Resources.
 
- 
getCollectionDeprecated.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.
 
- 
getAllToStringsGet a collection of strings representing the unified resource set (strings may duplicate).- Returns:
- Collection<String>
 
- 
getAllResources
 
-