public static class LazyIntDocVector.Reader extends Object implements IntDocVector.Reader
Constructor and Description |
---|
LazyIntDocVector.Reader(byte[] bytes,
int n) |
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfTerms()
Returns the total number of terms in this document.
|
int[] |
getPositions()
Returns the position offsets of the current term as an array.
|
boolean |
getPositions(TermPositions tp)
Returns the position offsets of the current term as a
TermPositions object. |
short |
getTf()
Returns the term frequency of the current term.
|
boolean |
hasMoreTerms()
Returns
true if there are more terms to read. |
int |
nextTerm()
Returns the next term.
|
void |
reset()
Resets the reader to the beginning of the document.
|
public LazyIntDocVector.Reader(byte[] bytes, int n) throws IOException
IOException
public int getNumberOfTerms()
IntDocVector.Reader
getNumberOfTerms
in interface IntDocVector.Reader
public int[] getPositions()
IntDocVector.Reader
getPositions
in interface IntDocVector.Reader
public boolean getPositions(TermPositions tp)
IntDocVector.Reader
TermPositions
object.getPositions
in interface IntDocVector.Reader
TermPositions
representing offsets of the current term.public short getTf()
IntDocVector.Reader
getTf
in interface IntDocVector.Reader
public boolean hasMoreTerms()
IntDocVector.Reader
true
if there are more terms to read.hasMoreTerms
in interface IntDocVector.Reader
true
if there are more terms to readpublic int nextTerm()
IntDocVector.Reader
nextTerm
in interface IntDocVector.Reader
public void reset()
IntDocVector.Reader
reset
in interface IntDocVector.Reader