Class SizeLimitCollection
- 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
- 
- org.apache.tools.ant.types.resources.SizeLimitCollection
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- java.lang.Iterable<Resource>,- ResourceCollection
 - Direct Known Subclasses:
- AllButFirst,- AllButLast,- First,- Last
 
 public abstract class SizeLimitCollection extends BaseResourceCollectionWrapper ResourceCollection that imposes a size limit on another ResourceCollection.- Since:
- Ant 1.7.1
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description SizeLimitCollection()
 - 
Method SummaryModifier and Type Method Description intgetCount()Get the number of resources to be included.protected intgetValidCount()Get the count, verifying it is >= 0.voidsetCount(int i)Set the number of resources to be included.intsize()Efficient size implementation.- 
Methods inherited from class org.apache.tools.ant.types.resources.BaseResourceCollectionWrappercreateIterator, getCollection, getSize
 - 
Methods inherited from class org.apache.tools.ant.types.resources.AbstractResourceCollectionWrapperadd, dieOnCircularReference, getResourceCollection, isCache, isFilesystemOnly, iterator, setCache, toString
 - 
Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, clone, 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
 
- 
 
- 
- 
- 
Method Detail- 
setCountpublic void setCount(int i) Set the number of resources to be included.- Parameters:
- i- the count as- int.
 
 - 
getCountpublic int getCount() Get the number of resources to be included. Default is 1.- Returns:
- the count as int.
 
 - 
sizepublic int size() Efficient size implementation.- Specified by:
- sizein interface- ResourceCollection
- Overrides:
- sizein class- AbstractResourceCollectionWrapper
- Returns:
- int size
 
 - 
getValidCountprotected int getValidCount() Get the count, verifying it is >= 0.- Returns:
- int count
 
 
- 
 
-