org.apache.lucene.search
Class PrefixTermEnum

java.lang.Object
  extended by org.apache.lucene.index.TermEnum
      extended by org.apache.lucene.search.FilteredTermEnum
          extended by org.apache.lucene.search.PrefixTermEnum
All Implemented Interfaces:
Closeable

public class PrefixTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.


Field Summary
 
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
 
Constructor Summary
PrefixTermEnum(IndexReader reader, Term prefix)
           
 
Method Summary
 float difference()
          Equality measure on the term
protected  boolean endEnum()
          Indicates the end of the enumeration has been reached
protected  Term getPrefixTerm()
           
protected  boolean termCompare(Term term)
          Equality compare on the term
 
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
close, docFreq, next, setEnum, term
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixTermEnum

public PrefixTermEnum(IndexReader reader,
                      Term prefix)
               throws IOException
Throws:
IOException
Method Detail

difference

public float difference()
Description copied from class: FilteredTermEnum
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

protected boolean endEnum()
Description copied from class: FilteredTermEnum
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

getPrefixTerm

protected Term getPrefixTerm()

termCompare

protected boolean termCompare(Term term)
Description copied from class: FilteredTermEnum
Equality compare on the term

Specified by:
termCompare in class FilteredTermEnum


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.