com.atlassian.crowd.search.util
Class SearchResultsUtil

java.lang.Object
  extended by com.atlassian.crowd.search.util.SearchResultsUtil

public class SearchResultsUtil
extends Object

Utility methods for processing search results.


Constructor Summary
SearchResultsUtil()
           
 
Method Summary
static
<T> List<T>
constrainResults(List<T> results, int startIndex, int maxResults)
          Performs a sublist operation on the list of results.
static List<String> convertEntitiesToNames(Iterable<? extends DirectoryEntity> entities)
          Transforms collection of directory entities to collection of entity names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResultsUtil

public SearchResultsUtil()
Method Detail

convertEntitiesToNames

public static List<String> convertEntitiesToNames(Iterable<? extends DirectoryEntity> entities)
Transforms collection of directory entities to collection of entity names.

Parameters:
entities - directory entities.
Returns:
names.

constrainResults

public static <T> List<T> constrainResults(List<T> results,
                                           int startIndex,
                                           int maxResults)
Performs a sublist operation on the list of results.

Type Parameters:
T - type of results is unchanged.
Parameters:
results - collection of all results.
startIndex - start index for output.
maxResults - max number of results for output. The special value EntityQuery.ALL_RESULTS is honoured.
Returns:
output sublist.


Copyright © 2013 Atlassian. All Rights Reserved.