public abstract class

FilteredTermEnum

extends TermEnum
java.lang.Object
   ↳ org.apache.lucene.index.TermEnum
     ↳ org.apache.lucene.search.FilteredTermEnum
Known Direct Subclasses

Class Overview

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.

Summary

Fields
protected TermEnum actualEnum the delegate enum - to set this member use setEnum(TermEnum)
protected Term currentTerm the current term
Public Constructors
FilteredTermEnum()
Public Methods
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.
boolean next()
Increments the enumeration to the next element.
Term term()
Returns the current Term in the enumeration.
Protected Methods
abstract boolean endEnum()
Indicates the end of the enumeration has been reached
void setEnum(TermEnum actualEnum)
use this method to set the actual TermEnum (e.g.
abstract boolean termCompare(Term term)
Equality compare on the term
[Expand]
Inherited Methods
From class org.apache.lucene.index.TermEnum
From class java.lang.Object
From interface java.io.Closeable

Fields

protected TermEnum actualEnum

the delegate enum - to set this member use setEnum(TermEnum)

protected Term currentTerm

the current term

Public Constructors

public FilteredTermEnum ()

Public Methods

public void close ()

Closes the enumeration to further activity, freeing resources.

Throws
IOException

public abstract float difference ()

Equality measure on the term

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.

public boolean next ()

Increments the enumeration to the next element. True if one exists.

Throws
IOException

public Term term ()

Returns the current Term in the enumeration. Returns null if no Term matches or all terms have been enumerated.

Protected Methods

protected abstract boolean endEnum ()

Indicates the end of the enumeration has been reached

protected void setEnum (TermEnum actualEnum)

use this method to set the actual TermEnum (e.g. in ctor), it will be automatically positioned on the first matching term.

Throws
IOException

protected abstract boolean termCompare (Term term)

Equality compare on the term