public interface ScoresCache
Implementations can treat this as a cache, with as much or as little persistence as required. If getScore() returns null, callers should recalculate the score and then store it for future calls. Implementations can therefore reset the cache if things which might impact the scores change.
A list of common scores are included to coordinate property names, but additional scores can be stored as well. As a result, this is a flexible cache that can store any score as a key-value object.
Modifier and Type | Method and Description |
---|---|
Double |
getScore(String property)
Get the value for a particular score.
|
Set<String> |
getScores()
Get a collection of all scores that have been set.
|
void |
putScore(String property,
Double score)
Add a score to the list of scores.
|
void putScore(String property, Double score)
property
- A string identifying the score and suitable for printing
in headers. Example names found in: MultipleAlignmentScorer
.score
- Value of the scoreDouble getScore(String property)
putScore(String, Double)
.property
- Name of the score to fetchCopyright © 2000–2016 BioJava. All rights reserved.