Class AbstractSearchResult<T>

java.lang.Object
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: 433a7ccd128922a0ff5e8ae44459511e4279b9d3 $
  • Constructor Details

    • 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 Details

    • 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