JAL-2403 simplify instantiation / configuration of score model for view
[jalview.git] / src / jalview / analysis / scoremodels / ScoreMatrix.java
index 9bec6e4..efaeb43 100644 (file)
@@ -20,7 +20,9 @@
  */
 package jalview.analysis.scoremodels;
 
+import jalview.api.AlignmentViewPanel;
 import jalview.api.analysis.PairwiseScoreModelI;
+import jalview.api.analysis.ScoreModelI;
 import jalview.api.analysis.SimilarityParamsI;
 import jalview.datamodel.AlignmentView;
 import jalview.math.Matrix;
@@ -31,7 +33,8 @@ import java.util.Arrays;
 
 /**
  * A class that models a substitution score matrix for any given alphabet of
- * symbols. Instances of this class are immutable and thread-safe.
+ * symbols. Instances of this class are immutable and thread-safe, so the same
+ * object is returned from calls to getInstance().
  */
 public class ScoreMatrix extends SimilarityScoreModel implements
         PairwiseScoreModelI
@@ -582,4 +585,10 @@ public class ScoreMatrix extends SimilarityScoreModel implements
   {
     return maxValue;
   }
+
+  @Override
+  public ScoreModelI getInstance(AlignmentViewPanel avp)
+  {
+    return this;
+  }
 }