From: jprocter Date: Thu, 26 Apr 2007 17:11:27 +0000 (+0000) Subject: score is a double, fix bugs for score only annotation not being associated with sequences X-Git-Tag: Release_2_3~158 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=86bf99474fd78966716a9d82ff925e4ec7c0663b;p=jalview.git score is a double, fix bugs for score only annotation not being associated with sequences --- diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index acb02b1..20a3633 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -57,7 +57,7 @@ public class AlignmentAnnotation /** * Score associated with label and description. */ - public float score= Float.NaN; + public double score= Double.NaN; /** * flag indicating if annotation has a score. */ @@ -483,13 +483,13 @@ Loading... { return; } + sequenceRef=seqRef; if (annotations==null) { return; } sequenceMapping = new java.util.Hashtable(); - sequenceRef = seqRef; int seqPos; for (int i = 0; i < annotations.length; i++) @@ -616,7 +616,7 @@ Loading... /** * @return the score */ - public float getScore() + public double getScore() { return score; } @@ -624,8 +624,9 @@ Loading... /** * @param score the score to set */ - public void setScore(float score) + public void setScore(double score) { + hasScore=true; this.score = score; } /** @@ -634,6 +635,6 @@ Loading... */ public boolean hasScore() { - return hasScore; + return hasScore || !Double.isNaN(score); } }