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.
| Constructor and Description |
|---|
CmsObjectListLimiter(java.util.List<A> baseList,
java.math.BigInteger maxItems,
java.math.BigInteger skipCount)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMore()
Checks if there are more items left in the base list which were not returned.
|
boolean |
hasNext() |
java.util.Iterator<A> |
iterator() |
A |
next() |
void |
remove() |
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 in interface java.util.Iterator<A>Iterator.hasNext()public java.util.Iterator<A> iterator()
iterator in interface java.lang.Iterable<A>Iterable.iterator()public A next()
next in interface java.util.Iterator<A>Iterator.next()