addElement
authoramwaterhouse <Andrew Waterhouse>
Mon, 2 Apr 2007 12:50:07 +0000 (12:50 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 2 Apr 2007 12:50:07 +0000 (12:50 +0000)
src/jalview/util/MapList.java

index 50077e3..4a59f88 100644 (file)
@@ -79,7 +79,7 @@ public class MapList
   /**
    * lowest and highest value in the to Map
    */
-  int[] toRange=null; 
+  int[] toRange=null;
   public int getFromRatio()
   {
     return fromRatio;
@@ -113,11 +113,11 @@ public class MapList
 
     fromShifts = new Vector();
     for (int i=0;i<from.length; i+=2)
-    {      
+    {
       ensureRange(fromRange, from[i]);
       ensureRange(fromRange, from[i+1]);
 
-      fromShifts.add(new int[]
+      fromShifts.addElement(new int[]
                              {from[i], from[i + 1]});
     }
     toShifts = new Vector();
@@ -125,7 +125,7 @@ public class MapList
     {
       ensureRange(toRange, to[i]);
       ensureRange(toRange, to[i+1]);
-      toShifts.add(new int[]
+      toShifts.addElement(new int[]
                            {to[i], to[i + 1]});
     }
     this.fromRatio=fromRatio;
@@ -272,7 +272,7 @@ public class MapList
     return shift(pos, toShifts, toRatio, fromShifts, fromRatio);
   }
   /**
-   * 
+   *
    * @param fromShifts
    * @param fromRatio
    * @param toShifts
@@ -435,17 +435,17 @@ public class MapList
       iv = (int[]) fromShifts2.elementAt(intv++);
       if (iv[0]<=iv[1]) {
         if (fs==-1 && startpos>=iv[0] && startpos<=iv[1]) {
-          fs = i; 
+          fs = i;
         }
         if (fe==-1 && endpos>=iv[0] && endpos<=iv[1]) {
-          fe = i; 
+          fe = i;
         }
       } else {
         if (fs==-1 && startpos<=iv[0] && startpos>=iv[1]) {
-          fs = i; 
+          fs = i;
         }
         if (fe==-1 && endpos<=iv[0] && endpos>=iv[1]) {
-          fe = i; 
+          fe = i;
         }
       }
       i++;
@@ -479,7 +479,7 @@ public class MapList
       iv = (int[]) fromShifts2.elementAt(i);
       iv = new int[] { iv[1], iv[0]};//  reverse and clone
       // truncate initial interval
-      if (i==fs) 
+      if (i==fs)
       {
         iv[0] = startpos;
       }
@@ -496,13 +496,13 @@ public class MapList
     }
     // create array of start end intervals.
     int[] range = null;
-    if (ranges!=null && ranges.size()>0) 
+    if (ranges!=null && ranges.size()>0)
     {
       range = new int[ranges.size()*2];
       intv = 0;
       intvSize=ranges.size();
-      i=0; 
-      while (intv<intvSize) 
+      i=0;
+      while (intv<intvSize)
       {
         iv = (int[]) ranges.elementAt(intv);
         range[i++] = iv[0];
@@ -605,7 +605,7 @@ public class MapList
         System.out.print("\n");
         f++;t--;
       }
-    }    
+    }
     System.out.print("\n");
     mmap = ml.makeToMap();
     System.out.println("ToMap : (" + mmap[0][0] + " " + mmap[0][1] + " " +
@@ -662,7 +662,7 @@ public class MapList
         f++; t--;
         System.out.print("\n");
       }
-    }    
+    }
 
   }