import jalview.api.AlignmentViewPanel;
import jalview.api.analysis.ScoreModelI;
-import jalview.bin.Instance;
import jalview.io.DataSourceType;
import jalview.io.FileParse;
import jalview.io.ScoreMatrixFile;
private final ScoreMatrix DNA;
+ private static ScoreModels instance;
+
+ private Map<String, ScoreModelI> models;
+
/**
* Answers the singleton instance of this class, with lazy initialisation
* (built-in score models are loaded on the first call to this method)
*/
public static ScoreModels getInstance()
{
- Instance j = Instance.getInstance();
- return (j.scoreModels == null ? j.scoreModels = new ScoreModels()
- : j.scoreModels);
+ if (instance == null)
+ {
+ instance = new ScoreModels();
+ }
+ return instance;
}
- private Map<String, ScoreModelI> models;
-
/**
* Private constructor to enforce use of singleton. Registers Jalview's
* "built-in" score models:
*/
public void reset()
{
- Instance.getInstance().scoreModels = new ScoreModels();
+ instance = new ScoreModels();
}
/**