java 1.1 compatibility
authorjprocter <Jim Procter>
Mon, 30 Jun 2008 09:50:27 +0000 (09:50 +0000)
committerjprocter <Jim Procter>
Mon, 30 Jun 2008 09:50:27 +0000 (09:50 +0000)
src/jalview/analysis/SeqsetUtils.java

index 3b443ab..0aa2bd5 100755 (executable)
@@ -59,7 +59,7 @@ public class SeqsetUtils
     {
       for (int i = 0; i < sfarray.length; i++)
       {
-        sfeat.add(sfarray[i]);
+        sfeat.addElement(sfarray[i]);
       }
     }
     sqinfo.put("SeqFeatures", sfeat);
@@ -114,7 +114,11 @@ public class SeqsetUtils
 
     if ( (sfeatures != null) && (sfeatures.size() > 0))
     {
-      SequenceFeature[] sfarray = (SequenceFeature[]) sfeatures.toArray();
+      SequenceFeature[] sfarray = new SequenceFeature[sfeatures.size()];
+      for (int is=0,isize=sfeatures.size();is<isize;is++)
+      { 
+        sfarray[is] = (SequenceFeature) sfeatures.elementAt(is);
+      }
       sq.setSequenceFeatures(sfarray);
     }
     if (description != null)
@@ -197,7 +201,7 @@ public class SeqsetUtils
     Vector unmatched = new Vector();
     for (int i = 0, j = sequences.length; i < j; i++)
     {
-      unmatched.add(sequences[i]);
+      unmatched.addElement(sequences[i]);
     }
     while (keys.hasMoreElements())
     {
@@ -207,7 +211,7 @@ public class SeqsetUtils
         if ( (msq = matcher.findIdMatch( (String) key)) != null)
         {
           Hashtable sqinfo = (Hashtable) map.get(key);
-          unmatched.remove(msq);
+          unmatched.removeElement(msq);
           SeqCharacterUnhash(msq, sqinfo);
         }
         else