1 package org.apache.lucene.index; 2 3 18 19 import java.io.IOException ; 20 21 25 26 public abstract class TermEnum { 27 28 public abstract boolean next() throws IOException ; 29 30 31 public abstract Term term(); 32 33 34 public abstract int docFreq(); 35 36 37 public abstract void close() throws IOException ; 38 39 41 54 public boolean skipTo(Term target) throws IOException { 55 do { 56 if (!next()) 57 return false; 58 } while (target.compareTo(term()) > 0); 59 return true; 60 } 61 } 62 | Popular Tags |