View Javadoc

1   package org.paneris.bibliomania.fti;
2   
3   abstract class TextSearchResultsBase implements TextSearchResults {
4   
5     public abstract void init();
6   
7     public abstract void skipToNextHit();
8   
9     public void skipToWordIndex(int wordIndex) {
10      for (;;) {
11        int cwi = currentWordIndex();
12        if (cwi != -1 && cwi < wordIndex)
13          skipToNextHit();
14        else
15          break;
16      }
17    }
18  
19    public abstract int currentWordIndex();
20  
21    public abstract int currentOffset();
22  }