JAL-1967 JAL-1479 refactored sequence<->structure mapping implementation
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index 9bd1f2e..7990a5c 100755 (executable)
@@ -245,6 +245,7 @@ public class AlignmentAnnotation
    * 
    * @see java.lang.Object#finalize()
    */
+  @Override
   protected void finalize() throws Throwable
   {
     sequenceRef = null;
@@ -1304,7 +1305,8 @@ public class AlignmentAnnotation
    * @note caller should add the remapped annotation to newref if they have not
    *       already
    */
-  public void remap(SequenceI newref, int[][] mapping, int from, int to,
+  public void remap(SequenceI newref, HashMap<Integer, int[]> mapping,
+          int from, int to,
           int idxoffset)
   {
     if (mapping != null)
@@ -1312,7 +1314,7 @@ public class AlignmentAnnotation
       Map<Integer, Annotation> old = sequenceMapping;
       Map<Integer, Annotation> remap = new HashMap<Integer, Annotation>();
       int index = -1;
-      for (int mp[] : mapping)
+      for (int mp[] : mapping.values())
       {
         if (index++ < 0)
         {