org.apache.tools.ant.types.resources
public class: First [javadoc |
source]
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.resources.BaseResourceCollectionWrapper
org.apache.tools.ant.types.resources.SizeLimitCollection
org.apache.tools.ant.types.resources.First
All Implemented Interfaces:
ResourceCollection, Cloneable
ResourceCollection that contains the first
count elements of
another ResourceCollection, a la the UNIX head command.
| Method from org.apache.tools.ant.types.resources.First Summary: |
|---|
|
getCollection |
| Methods from org.apache.tools.ant.types.DataType: |
|---|
|
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, setRefid, toString, tooManyAttributes |
| Method from org.apache.tools.ant.types.resources.First Detail: |
protected Collection getCollection() {
int ct = getValidCount();
Iterator iter = getResourceCollection().iterator();
ArrayList al = new ArrayList(ct);
for (int i = 0; i < ct && iter.hasNext(); i++) {
al.add(iter.next());
}
return al;
}
Take the first count elements. |