|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.languagecomputer.api.query.DefaultQueryResult
public class DefaultQueryResult
Default implementation of a QueryResult
.
Alternatively, the QueryResult
interface may be implemented in
order to be backed by a different mechanism (i.e., for speed and/or memory
performance based on the individual system).
Constructor Summary | |
---|---|
DefaultQueryResult()
|
Method Summary | |
---|---|
Document |
getDocument()
Returns the Document associated with this QueryResult . |
double |
getScore()
Returns a score for this QueryResult in the range of
(0.0-1.0] (optional). |
void |
setDocument(Document document)
Sets the Document to use for this DefaultQueryResult . |
void |
setScore(double score)
Sets the score to use for this DefaultQueryResult . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultQueryResult()
Method Detail |
---|
public void setDocument(Document document)
Document
to use for this DefaultQueryResult
.
document
- non-null
Document
this result wraps.
IllegalArgumentException
- If the document is
null
.getDocument()
public Document getDocument()
Document
associated with this QueryResult
.
getDocument
in interface QueryResult
Document
.public void setScore(double score)
DefaultQueryResult
.
score
- Result score, must be within the range (0.0-1.0]
.
IllegalArgumentException
- If the score does not fall
within the expected range.getScore()
public double getScore()
QueryResult
in the range of
(0.0-1.0]
(optional). If the implementor chooses not to
provide a score, then 1.0
should be used.
getScore
in interface QueryResult
QueryResult
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |