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>
Make several iterable results look like one.
- Since:
- 4.0M1
- Version:
- $Id: 308d2e691f62c44ace9a247c5f76c71b6a275e13 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSearchResult
(IterableResult<T> result) int
int
getSize()
int
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
-
Constructor Details
-
AggregatedIterableResult
public AggregatedIterableResult(int offset) - Parameters:
offset
- the initial offset
-
-
Method Details
-
addSearchResult
- Parameters:
result
- a iterable result instance to append
-
iterator
-
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
-