Package org.opencms.cmis
Class CmsObjectListLimiter<A>
java.lang.Object
org.opencms.cmis.CmsObjectListLimiter<A>
- Type Parameters:
A
- the content type of the list
Helper class to ease implementation of CMIS service methods which support paging.
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 Summary
ConstructorDescriptionCmsObjectListLimiter
(List<A> baseList, BigInteger maxItems, BigInteger skipCount) Creates a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
CmsObjectListLimiter
Creates a new instance.- Parameters:
baseList
- the list over which we want to iteratemaxItems
- the maximum number of itemsskipCount
- the number of items to skip
-
-
Method Details
-
hasMore
Checks if there are more items left in the base list which were not returned.- Returns:
- true if there are more items left in the base list which were not returned
-
hasNext
-
iterator
-
next
-
remove
-