Merge branch 'develop' into features/JAL-653_JAL-1766_htslib_refseqsupport
[jalview.git] / src / jalview / datamodel / Mapping.java
index ea08d97..c4c4a2a 100644 (file)
@@ -253,8 +253,7 @@ public class Mapping
        * allow for offset e.g. treat pos 8 as 2 if sequence starts at 7
        */
       int truePos = sequencePos - (start - 1);
-      while (alignedBases < truePos
-              && alignedColumn < alignedSeq.length)
+      while (alignedBases < truePos && alignedColumn < alignedSeq.length)
       {
         if (alignedSeq[alignedColumn++] != gap)
         {
@@ -694,6 +693,7 @@ public class Mapping
    * 
    * @see java.lang.Object#finalize()
    */
+  @Override
   protected void finalize() throws Throwable
   {
     map = null;
@@ -706,4 +706,14 @@ public class Mapping
     return new AlignedCodonIterator(seq, gapChar);
   }
 
+  /**
+   * Readable representation for debugging only, not guaranteed not to change
+   */
+  @Override
+  public String toString()
+  {
+    return String.format("%s %s", this.map.toString(), this.to == null ? ""
+            : this.to.getName());
+  }
+
 }