|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEmptySpans
public class EmptySpans
Expert: An empty list of spans, suitable for ORing with other lists.
Field Summary | |
---|---|
static EmptySpans |
theInstance
Static instance; there's no need to ever create a new EmptySpans() |
Constructor Summary | |
---|---|
private |
EmptySpans()
Don't create a new instance... use theInstance . |
Method Summary | |
---|---|
void |
collectTerms(Set terms)
|
int |
doc()
Returns the document number of the current match. |
int |
end()
Returns the end position of the current match. |
Explanation |
explain()
Returns an explanation of how the score was arrived at. |
boolean |
next()
Move to the next match, returning true iff any such exists. |
float |
score()
Returns the score of the current match. |
boolean |
skipTo(int target)
Skips to the first match beyond the current, whose document number is greater than or equal to target. |
int |
start()
Returns the start position of the current match. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static EmptySpans theInstance
Constructor Detail |
---|
private EmptySpans()
theInstance
.
Method Detail |
---|
public boolean next() throws IOException
Spans
next
in interface Spans
IOException
public boolean skipTo(int target) throws IOException
Spans
Returns true iff there is such a match.
Behaves as if written:
boolean skipTo(int target) { do { if (!next()) return false; } while (target > doc()); return true; }Most implementations are considerably more efficient than that.
skipTo
in interface Spans
IOException
public int doc()
Spans
doc
in interface Spans
public int start()
Spans
start
in interface Spans
public int end()
Spans
end
in interface Spans
public float score()
Spans
score
in interface Spans
public void collectTerms(Set terms)
public Explanation explain()
Spans
explain
in interface Spans
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |