Coverage Report - org.galagosearch.core.retrieval.structured.ExtentIterator
 
Classes in this File Line Coverage Branch Coverage Complexity
ExtentIterator
83%
5/6
90%
9/10
0
 
 1  
 // BSD License (http://www.galagosearch.org/license)
 2  
 package org.galagosearch.core.retrieval.structured;
 3  
 
 4  
 import java.io.IOException;
 5  
 import org.galagosearch.core.util.ExtentArray;
 6  
 
 7  
 /**
 8  
  * This is base interface for all inverted lists that return count information.
 9  
  * See the CountIterator class for documentation on most of these methods.
 10  
  * 
 11  
  * @author trevor
 12  
  */
 13  176
 public abstract class ExtentIterator extends CountIterator {
 14  
     public abstract void nextDocument() throws IOException;
 15  
     public abstract int document();
 16  
     public abstract int count();
 17  
     public abstract ExtentArray extents();
 18  
     public abstract boolean isDone();
 19  
     public abstract void reset() throws IOException;
 20  
 
 21  
     @Override
 22  
     public boolean skipToDocument(int document) throws IOException {
 23  68
         if (isDone()) {
 24  0
             return false;
 25  
         }
 26  140
         while (!isDone() && document() < document) {
 27  72
             nextDocument();
 28  
         }
 29  68
         return !isDone() && document == document();
 30  
     }
 31  
 }