A
- the content type of the listpublic class CmsObjectListLimiter<A>
extends java.lang.Object
implements java.lang.Iterable<A>, java.util.Iterator<A>
This class works as an iterator for a given list, and limits the number of iterations based on skip/max parameters which are usually passed to the service methods.
构造器和说明 |
---|
CmsObjectListLimiter(java.util.List<A> baseList,
java.math.BigInteger maxItems,
java.math.BigInteger skipCount)
Creates a new instance.
|
public CmsObjectListLimiter(java.util.List<A> baseList, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
baseList
- the list over which we want to iteratemaxItems
- the maximum number of itemsskipCount
- the number of items to skippublic boolean hasMore()
public boolean hasNext()
hasNext
在接口中 java.util.Iterator<A>
Iterator.hasNext()
public java.util.Iterator<A> iterator()
iterator
在接口中 java.lang.Iterable<A>
Iterable.iterator()
public void remove()
remove
在接口中 java.util.Iterator<A>
Iterator.remove()