public abstract class TermEnum
extends java.lang.Object
Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.
Constructor and Description |
---|
TermEnum() |
Modifier and Type | Method and Description |
---|---|
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.
|
public abstract boolean next() throws java.io.IOException
java.io.IOException
public abstract Term term()
public abstract int docFreq()
public abstract void close() throws java.io.IOException
java.io.IOException
public boolean skipTo(Term target) throws java.io.IOException
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.
java.io.IOException
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.