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
IOExceptionpublic int getNumberOfTerms()
IntDocVector.ReadergetNumberOfTerms in interface IntDocVector.Readerpublic int[] getPositions()
IntDocVector.ReadergetPositions in interface IntDocVector.Readerpublic boolean getPositions(TermPositions tp)
IntDocVector.ReaderTermPositions object.getPositions in interface IntDocVector.ReaderTermPositions representing offsets of the current term.public short getTf()
IntDocVector.ReadergetTf in interface IntDocVector.Readerpublic boolean hasMoreTerms()
IntDocVector.Readertrue if there are more terms to read.hasMoreTerms in interface IntDocVector.Readertrue if there are more terms to readpublic int nextTerm()
IntDocVector.ReadernextTerm in interface IntDocVector.Readerpublic void reset()
IntDocVector.Readerreset in interface IntDocVector.Reader