TermEnum (Lucene 2.4.1 API)
Keywords: org.apache.lucene.index.TermEnum 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.index
Class TermEnum

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

Direct Known Subclasses:
  FilteredTermEnum, FilterIndexReader.FilterTermEnum, InstantiatedTermEnum

    public abstract class TermEnum

extends Object

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
`TermEnum()`

Method Summary
`abstract void` | `close()` Closes the enumeration to further activity, freeing resources.
`abstract int` | `docFreq()` Returns the docFreq of the current Term in the enumeration.
`abstract boolean` | `next()` Increments the enumeration to the next element.
`boolean` | `skipTo(Term target)` Skips terms to the first beyond the current whose value is greater or equal to target.
`abstract Term` | `term()` Returns the current Term in the enumeration.

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

Constructor Detail

### TermEnum

    public TermEnum()

Method Detail

### next

    public abstract boolean next()
                          throws IOException

  Increments 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 IOException

  Closes the enumeration to further activity, freeing resources.

  Throws:
    `IOException`

### skipTo

    public boolean skipTo(Term target)
                   throws IOException

  Skips terms to the first beyond the current whose value is greater or equal to target.

  Returns true iff there is such an entry.

  Behaves as if written:

         public boolean skipTo(Term target) {
           do {
             if (!next())
                   return false;
           } while (target > term());
           return true;
         }

  Some implementations are considerably more efficient than that.

  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

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