Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » index » [javadoc | source]
org.apache.lucene.index
abstract public class: TermEnum [javadoc | source]
java.lang.Object
   org.apache.lucene.index.TermEnum

Direct Known Subclasses:
    FilterTermEnum, SegmentTermEnum, ParallelTermEnum, FilteredTermEnum, FuzzyTermEnum, WildcardTermEnum, RegexTermEnum, MultiTermEnum

Abstract class for enumerating terms.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.
Method from org.apache.lucene.index.TermEnum Summary:
close,   docFreq,   next,   skipTo,   term
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.index.TermEnum Detail:
 abstract public  void close() throws IOException
    Closes the enumeration to further activity, freeing resources.
 abstract public int docFreq()
    Returns the docFreq of the current Term in the enumeration.
 abstract public boolean next() throws IOException
    Increments the enumeration to the next element. True if one exists.
 public boolean skipTo(Term target) throws IOException 
    Skips terms to the first beyond the current whose value is greater or equal to target.

    Returns true iff there is such an entry.

    Behaves as if written:

    public boolean skipTo(Term target) {
    do {
    if (!next())
    return false;
    } while (target > term());
    return true;
    }
    
    Some implementations are considerably more efficient than that.
 abstract public Term term()
    Returns the current Term in the enumeration.