com.atlassian.crowd.manager.application
Class ResultsAggregator<T>
java.lang.Object
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.
Method Summary |
static
|
with(com.google.common.base.Function<? super T,? extends K> maker,
int startIndex,
int maxResults)
|
static
|
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 |
ResultsAggregator
public ResultsAggregator()
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 functionquery
- 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 © 2012 Atlassian. All Rights Reserved.