Package org.apache.lucene.index
Class TermEnum
- java.lang.Object
-
- org.apache.lucene.index.TermEnum
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
FilteredTermEnum,FilterIndexReader.FilterTermEnum
public abstract class TermEnum extends Object implements Closeable
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.
-
-
Constructor Summary
Constructors Constructor Description TermEnum()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidclose()Closes the enumeration to further activity, freeing resources.abstract intdocFreq()Returns the docFreq of the current Term in the enumeration.abstract booleannext()Increments the enumeration to the next element.abstract Termterm()Returns the current Term in the enumeration.
-
-
-
Method Detail
-
next
public abstract boolean next() throws IOExceptionIncrements the enumeration to the next element. True if one exists.- Throws:
IOException
-
term
public abstract Term term()
Returns the current Term in the enumeration.
-
docFreq
public abstract int docFreq()
Returns the docFreq of the current Term in the enumeration.
-
close
public abstract void close() throws IOExceptionCloses the enumeration to further activity, freeing resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-