Class BaseResourceCollectionWrapper
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.resources.AbstractResourceCollectionWrapper
org.apache.tools.ant.types.resources.BaseResourceCollectionWrapper
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<Resource>,ResourceCollection
- Direct Known Subclasses:
SizeLimitCollection,Sort,Tokens
public abstract class BaseResourceCollectionWrapper extends AbstractResourceCollectionWrapper
Base class for a ResourceCollection that wraps a single nested
ResourceCollection.
- Since:
- Ant 1.7
-
Field Summary
-
Constructor Summary
Constructors Constructor Description BaseResourceCollectionWrapper() -
Method Summary
Modifier and Type Method Description protected java.util.Iterator<Resource>createIterator()Do create an iterator on the resource collection.protected abstract java.util.Collection<Resource>getCollection()Template method for subclasses to return a Collection of Resources.protected intgetSize()Do compute the size of the resource collection.Methods inherited from class org.apache.tools.ant.types.resources.AbstractResourceCollectionWrapper
add, dieOnCircularReference, getResourceCollection, isCache, isFilesystemOnly, iterator, setCache, size, toStringMethods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributesMethods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
BaseResourceCollectionWrapper
public BaseResourceCollectionWrapper()
-
-
Method Details
-
createIterator
Description copied from class:AbstractResourceCollectionWrapperDo create an iterator on the resource collection. The creation of the iterator is allowed to not be thread safe whereas the iterator itself should. The returned iterator will be wrapped into the FailFast one.- Specified by:
createIteratorin classAbstractResourceCollectionWrapper- Returns:
- the iterator on the resource collection
-
getSize
protected int getSize()Description copied from class:AbstractResourceCollectionWrapperDo compute the size of the resource collection. The implementation of this function is allowed to be not thread safe.- Specified by:
getSizein classAbstractResourceCollectionWrapper- Returns:
- size of resource collection.
-
getCollection
Template method for subclasses to return a Collection of Resources.- Returns:
- Collection.
-