public class Relevance extends Object implements Comparable<Relevance>
Sources may create subclasses of this to include additional information or functionality.
Modifier and Type | Field and Description |
---|---|
private double |
score
The relevancy score.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
Relevance(double score)
Construct a relevancy object with an initial value.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Relevance other)
Compares relevancy values with
|
boolean |
equals(Object object)
Compares relevancy values
|
double |
getScore()
Returns the relevancy score of this, preferably a normalized value
between 0 and 1 but this is not guaranteed by this framework
|
int |
hashCode()
Returns a hash from the relevancy value
|
void |
setScore(double score)
Set score value to this value.
|
String |
toString()
Returns the score value as a string
|
private static final long serialVersionUID
private double score
public Relevance(double score)
score
- the inital value (rank score)public void setScore(double score)
public double getScore()
public String toString()
public int compareTo(Relevance other)
compareTo
in interface Comparable<Relevance>
public boolean equals(Object object)
Copyright © 2018. All rights reserved.