Class AggregatedIterableResult<T>
- java.lang.Object
-
- org.xwiki.extension.repository.result.AggregatedIterableResult<T>
-
- Type Parameters:
T
- the type
- All Implemented Interfaces:
Iterable<T>
,IterableResult<T>
public class AggregatedIterableResult<T> extends Object implements IterableResult<T>
Make several iterable results look like one.- Since:
- 4.0M1
- Version:
- $Id: 308d2e691f62c44ace9a247c5f76c71b6a275e13 $
-
-
Constructor Summary
Constructors Constructor Description AggregatedIterableResult(int offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSearchResult(IterableResult<T> result)
int
getOffset()
int
getSize()
int
getTotalHits()
Iterator<T>
iterator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
addSearchResult
public void addSearchResult(IterableResult<T> result)
- Parameters:
result
- a iterable result instance to append
-
getTotalHits
public int getTotalHits()
- Specified by:
getTotalHits
in interfaceIterableResult<T>
- Returns:
- the total number of possible results without offset or maximum results limits
-
getOffset
public int getOffset()
- Specified by:
getOffset
in interfaceIterableResult<T>
- Returns:
- the index in the total number of possible search result where this extract starts
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceIterableResult<T>
- Returns:
- the number of found extensions
-
-