Package com.atlassian.crowd.search.util
Class OrderedResultsConstrainer<T>
java.lang.Object
com.atlassian.crowd.search.util.OrderedResultsConstrainer<T>
Helper class constraining results according to the start index and maximum results.
-
Constructor Summary
ConstructorDescriptionOrderedResultsConstrainer
(Predicate<T> filter, int startIndex, int maxResults) -
Method Summary
-
Constructor Details
-
OrderedResultsConstrainer
- Parameters:
filter
- results filter,null
means no filteringstartIndex
- results with index lower thanstartIndex
will be droppedmaxResults
- maximum number of results, for all results specifyEntityQuery.ALL_RESULTS
-
-
Method Details
-
addAll
- Parameters:
collection
- collection to append to results
-
toList
Returns constrained results. -
getRemainingCount
public int getRemainingCount()Returns remaining number of results that need to be fetched. IfEntityQuery.ALL_RESULTS
were requested then returnsEntityQuery.ALL_RESULTS
.
-