Class FilteringResultIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.util.List<ResultElement>>

    public class FilteringResultIterator
    extends java.lang.Object
    implements java.util.Iterator<java.util.List<ResultElement>>
    A result iterator that skips things we aren't interested in.
    Author:
    Alex Kalderimis
    • Constructor Summary

      Constructors 
      Constructor Description
      FilteringResultIterator​(Results res)
      Construct a new iterator which does no filtering.
      FilteringResultIterator​(Results res, int start, int size, java.lang.String filterTerm)
      Construct a new iterator which filters to things that match a filter term and only returns results in a given window.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      java.util.List<ResultElement> next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Constructor Detail

      • FilteringResultIterator

        public FilteringResultIterator​(Results res)
        Construct a new iterator which does no filtering.
        Parameters:
        res - The results to wrap.
      • FilteringResultIterator

        public FilteringResultIterator​(Results res,
                                       int start,
                                       int size,
                                       java.lang.String filterTerm)
        Construct a new iterator which filters to things that match a filter term and only returns results in a given window.
        Parameters:
        res - The results to wrap.
        start - The index of the first result to return.
        size - The maximum number of results to return.
        filterTerm - A filter term.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.util.List<ResultElement>>
      • next

        public java.util.List<ResultElement> next()
        Specified by:
        next in interface java.util.Iterator<java.util.List<ResultElement>>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.util.List<ResultElement>>