com.atlassian.crowd.manager.application
Class ResultsAggregator<T>

java.lang.Object
  extended by com.atlassian.crowd.manager.application.ResultsAggregator<T>
Type Parameters:
T - the type of the individual results

public abstract class ResultsAggregator<T>
extends Object

An aggregator across results from multiple queries that may include duplicates. A provided key-making function provides a distinct sortable identifier for each result, allowing duplicates to be excluded and results to be provided in the correct order.


Constructor Summary
ResultsAggregator()
           
 
Method Summary
static
<T,K extends Comparable<? super K>>
ResultsAggregator<T>
with(com.google.common.base.Function<? super T,? extends K> maker, int startIndex, int maxResults)
           
static
<T,K extends Comparable<? super K>>
ResultsAggregator<T>
with(com.google.common.base.Function<? super T,? extends K> maker, Query<? extends T> query)
          Create an instance that will use the provided function to uniquely identify results and that will expect as many total results as indicated by the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultsAggregator

public ResultsAggregator()
Method Detail

with

public static <T,K extends Comparable<? super K>> ResultsAggregator<T> with(com.google.common.base.Function<? super T,? extends K> maker,
                                                                            Query<? extends T> query)
Create an instance that will use the provided function to uniquely identify results and that will expect as many total results as indicated by the query.

Parameters:
maker - a key-making function
query - an indication of how many results are required

with

public static <T,K extends Comparable<? super K>> ResultsAggregator<T> with(com.google.common.base.Function<? super T,? extends K> maker,
                                                                            int startIndex,
                                                                            int maxResults)


Copyright © 2013 Atlassian. All Rights Reserved.