Accepts a LinkedList of search results, and applies the
offset and
maxResults to the results.
The result list is first sorted using the supplied
comparator.
If a positive offset is supplied, and it is less than the total size of the result list, then the result list up
to the offset is cleared. If the offset is greater than the total size of the list, it is cleared.
If a positive maxResults is supplied and the total size of the result is is greater than maxResults, the extra
results are cleared from the list.