JAL-1807 explicit imports (jalview.util)
[jalview.git] / src / jalview / util / GroupUrlLink.java
index 6665f51..026e289 100644 (file)
@@ -24,7 +24,8 @@ import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 
 import java.util.Hashtable;
-import java.util.Vector;
+
+import com.stevesoft.pat.Regex;
 
 public class GroupUrlLink
 {
@@ -150,7 +151,7 @@ public class GroupUrlLink
     }
     ptok[ntoks] = link.length();
     tmtch[ntoks] = "$$$$$$$$$";
-    jalview.util.QuickSort.sortInt(ptok, tmtch);
+    QuickSort.sortInt(ptok, tmtch);
     for (int i = 0; i < ntoks; i++)
     {
       mtch[i] = tmtch[i]; // TODO: check order is ascending
@@ -217,7 +218,7 @@ public class GroupUrlLink
         regexReplace[pass] = link.substring(ptok[pass] + mlength, p);
         try
         {
-          com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex.perlCode("/"
+          Regex rg = Regex.perlCode("/"
                   + regexReplace[pass] + "/");
           if (rg == null)
           {
@@ -320,10 +321,12 @@ public class GroupUrlLink
   private String _replaceFor(String token)
   {
     for (int i = 0; i < mtch.length; i++)
+    {
       if (segs[i] > -1 && mtch[i].equals(token))
       {
         return regexReplace[i];
       }
+    }
     return null;
   }
 
@@ -499,13 +502,13 @@ public class GroupUrlLink
     // iterate through input, collating segments to be inserted into url
     StringBuffer matched[] = new StringBuffer[idseq.length];
     // and precompile regexes
-    com.stevesoft.pat.Regex[] rgxs = new com.stevesoft.pat.Regex[matched.length];
+    Regex[] rgxs = new Regex[matched.length];
     for (pass = 0; pass < matched.length; pass++)
     {
       matched[pass] = new StringBuffer();
       if (regexReplace[pass] != null)
       {
-        rgxs[pass] = com.stevesoft.pat.Regex.perlCode("/"
+        rgxs[pass] = Regex.perlCode("/"
                 + regexReplace[pass] + "/");
       }
       else
@@ -544,7 +547,7 @@ public class GroupUrlLink
         }
         if (rgxs[pass] != null)
         {
-          com.stevesoft.pat.Regex rg = rgxs[pass];
+          Regex rg = rgxs[pass];
           int rematchat = 0;
           // concatenate all matches of re in the given string!
           while (rg.searchFrom(idseq[pass][sq], rematchat))