FilteredTermEnum (Lucene 3.6.2 API)
Keywords: org.apache.lucene.search.FilteredTermEnum class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search
Class FilteredTermEnum

    java.lang.Object
      org.apache.lucene.index.TermEnum
          org.apache.lucene.search.FilteredTermEnum

All Implemented Interfaces:
  Closeable

Direct Known Subclasses:
  FuzzyTermEnum, PrefixTermEnum, SingleTermEnum, TermRangeTermEnum, 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.

Field Summary
`protected TermEnum` | `actualEnum` the delegate enum - to set this member use `setEnum(org.apache.lucene.index.TermEnum)`
`protected Term` | `currentTerm` the current term

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)` use this method to set the actual TermEnum (e.g.
`Term` | `term()` Returns the current Term in the enumeration.
`protected abstract boolean` | `termCompare(Term term)` Equality compare on the term

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### currentTerm

    protected Term currentTerm

  the current term

### actualEnum

    protected TermEnum actualEnum

  the delegate enum - to set this member use `setEnum(org.apache.lucene.index.TermEnum)`

Constructor Detail

### FilteredTermEnum

    public FilteredTermEnum()

Method Detail

### termCompare

    protected abstract boolean termCompare(Term term)

  Equality compare on the term

### difference

    public abstract float difference()

  Equality measure on the term

### endEnum

    protected abstract boolean endEnum()

  Indicates the end of the enumeration has been reached

### setEnum

    protected void setEnum(TermEnum actualEnum)
                    throws IOException

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

  Throws:
    `IOException`

### 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.

  Specified by:
    `docFreq` in class `TermEnum`

### next

    public boolean next()
                 throws IOException

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

  Specified by:
    `next` in class `TermEnum`
  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.

  Specified by:
    `term` in class `TermEnum`

### close

    public void close()
               throws IOException

  Closes the enumeration to further activity, freeing resources.

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in class `TermEnum`
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD