| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<Scoreable> |
COMPARATOR
A
Scoreable comparator that is used to order scoreables according to their score,
in descending order. |
| Modifier and Type | Method and Description |
|---|---|
float |
calculateScore(Data data)
Calculates a score against the given data.
|
float |
getScore()
Retrieves a previously calculated (and possibly normalized) score
|
float |
normalizeScore(float maxScore)
Normalizes a previously calculated score
|
static final java.util.Comparator<Scoreable> COMPARATOR
Scoreable comparator that is used to order scoreables according to their score,
in descending order.
Note: since a higher score results in a lower natural order,
statements such as Collections.min(list, Scoreable.COMPARATOR)
actually return the Scoreable with the highest score,
in contrast to the natural meaning of the word "min".
float calculateScore(Data data)
data - the data to be scoredfloat getScore()
float normalizeScore(float maxScore)
maxScore - maximum score to use for norm