Class 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 Detail

      • AggregatedIterableResult

        public AggregatedIterableResult​(int offset)
        Parameters:
        offset - the initial offset
    • 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 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