org.apache.lucene.search

Class FilteredTermEnum

Known Direct Subclasses:
FuzzyTermEnum, RegexTermEnum, 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.
abstract float
difference()
Equality measure on the term
int
docFreq()
Returns the docFreq of the current Term in the enumeration.
protected abstract boolean
endEnum()
Indicates 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

close, docFreq, next, skipTo, term

Constructor Details

FilteredTermEnum

public FilteredTermEnum()

Method Details

close

public void close()
            throws IOException
Closes the enumeration to further activity, freeing resources.
Overrides:
close in interface TermEnum

difference

public abstract float difference()
Equality measure on the term

docFreq

public int docFreq()
Returns the docFreq of the current Term in the enumeration. Returns -1 if no Term matches or all terms have been enumerated.
Overrides:
docFreq in interface TermEnum

endEnum

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

next

public boolean next()
            throws IOException
Increments the enumeration to the next element. True if one exists.
Overrides:
next in interface TermEnum

setEnum

protected void setEnum(TermEnum actualEnum)
            throws IOException

term

public Term term()
Returns the current Term in the enumeration. Returns null if no Term matches or all terms have been enumerated.
Overrides:
term in interface TermEnum

termCompare

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

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