org.xwiki.extension.repository.result
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: 4e93c43250768b45581b37765d531dc929d798ff $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AggregatedIterableResult
public AggregatedIterableResult(int offset)
- Parameters:
offset - the initial offset
addSearchResult
public void addSearchResult(IterableResult<T> result)
- Parameters:
result - a iterable result instance to append
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T>
getTotalHits
public int getTotalHits()
- Specified by:
getTotalHits in interface IterableResult<T>
- Returns:
- the total number of possible results without offset or maximum results limits
getOffset
public int getOffset()
- Specified by:
getOffset in interface IterableResult<T>
- Returns:
- the index in the total number of possible search result where this extract starts
getSize
public int getSize()
- Specified by:
getSize in interface IterableResult<T>
- Returns:
- the number of found extensions
Copyright © 2004-2013 XWiki. All Rights Reserved.