org.apache.lucene.search
Class FilteredTermEnum

java.lang.Object
  extended by org.apache.lucene.index.TermEnum
      extended by org.apache.lucene.search.FilteredTermEnum
Direct Known Subclasses:
FuzzyTermEnum, WildcardTermEnum

public abstract class FilteredTermEnum
extends TermEnum

Abstract class for enumerating a subset of all terms.

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


Constructor Summary
FilteredTermEnum()
           
 
Method Summary
 void close()
          Closes the enumeration to further activity, freeing resources.
protected abstract  float difference()
          Equality measure on the term
 int docFreq()
          Returns the docFreq of the current Term in the enumeration.
protected abstract  boolean endEnum()
          Indiciates the end of the enumeration has been reached
 boolean next()
          Increments the enumeration to the next element.
protected  void setEnum(TermEnum actualEnum)
           
 Term term()
          Returns the current Term in the enumeration.
protected abstract  boolean termCompare(Term term)
          Equality compare on the term
 
Methods inherited from class org.apache.lucene.index.TermEnum
skipTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredTermEnum

public FilteredTermEnum()
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

termCompare

protected abstract boolean termCompare(Term term)
Equality compare on the term


difference

protected abstract float difference()
Equality measure on the term


endEnum

protected abstract boolean endEnum()
Indiciates the end of the enumeration has been reached


setEnum

protected void setEnum(TermEnum actualEnum)
                throws java.io.IOException
Throws:
java.io.IOException

docFreq

public int docFreq()
Returns the docFreq of the current Term in the enumeration. Initially invalid, valid after next() called for the first time.

Specified by:
docFreq in class TermEnum

next

public boolean next()
             throws java.io.IOException
Increments the enumeration to the next element. True if one exists.

Specified by:
next in class TermEnum
Throws:
java.io.IOException

term

public Term term()
Returns the current Term in the enumeration. Initially invalid, valid after next() called for the first time.

Specified by:
term in class TermEnum

close

public void close()
           throws java.io.IOException
Closes the enumeration to further activity, freeing resources.

Specified by:
close in class TermEnum
Throws:
java.io.IOException


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