org.xwiki.extension.repository.result
Class AbstractSearchResult<T>

java.lang.Object
  extended by org.xwiki.extension.repository.result.AbstractSearchResult<T>
Type Parameters:
T - the type
All Implemented Interfaces:
Iterable<T>, IterableResult<T>
Direct Known Subclasses:
CollectionIterableResult

public abstract class AbstractSearchResult<T>
extends Object
implements IterableResult<T>

Utility base class for IterableResult implementations.

Since:
4.0M1
Version:
$Id$

Constructor Summary
AbstractSearchResult(int totalHits, int offset)
           
 
Method Summary
 int getOffset()
           
 int getTotalHits()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.extension.repository.result.IterableResult
getSize
 
Methods inherited from interface java.lang.Iterable
iterator
 

Constructor Detail

AbstractSearchResult

public AbstractSearchResult(int totalHits,
                            int offset)
Parameters:
totalHits - the total number of possible results without offset or maximum results limits
offset - the index in the total number of possible search result where this extract starts
Method Detail

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


Copyright © 2004-2012 XWiki. All Rights Reserved.