public class FallbackResult extends java.lang.Object implements Result
Result from a FallbackItemScorer.
| Modifier and Type | Method and Description |
|---|---|
<T extends Result> |
as(java.lang.Class<T> type)
Convert this result to another type.
|
boolean |
equals(java.lang.Object o) |
long |
getId()
Get the ID for the result.
|
Result |
getInnerResult()
Get the result from the scorer that produced this score.
|
double |
getScore()
Get the score (value) associated with this result.
|
int |
hashCode() |
boolean |
hasScore()
Query whether the result has a score.
|
boolean |
isFromPrimary()
Query whether this result came from the primary or the baseline item scorer.
|
public long getId()
ResultGet the ID for the result.
public double getScore()
ResultGet the score (value) associated with this result.
public boolean hasScore()
ResultQuery whether the result has a score. This is equivalent to testing the return value of Result.getScore() with Double.isNaN(double), but may make the resulting code more readable.
@Nullable public <T extends Result> T as(@Nonnull java.lang.Class<T> type)
Convert this result to another type. If the type is not a superclass of FallbackResult, then this method delegates to the inner result.
public boolean isFromPrimary()
Query whether this result came from the primary or the baseline item scorer.
true if the result came from the primary item scorer.public Result getInnerResult()
Get the result from the scorer that produced this score.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object