JAL-1807 explicit imports (jalview.analysis)
[jalview.git] / src / jalview / analysis / Conservation.java
index 1aa29e0..2155b31 100755 (executable)
  */
 package jalview.analysis;
 
-import java.awt.Color;
-import java.util.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceI;
+import jalview.schemes.ResidueProperties;
+import jalview.util.Comparison;
 
-import jalview.datamodel.*;
+import java.awt.Color;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
 
 /**
  * Calculates conservation values for a given set of sequences
@@ -108,7 +116,7 @@ public class Conservation
     {
       for (s = 0; s < sSize; s++)
       {
-        sarray[s] = (SequenceI) sequences.get(s);
+        sarray[s] = sequences.get(s);
         if (sarray[s].getLength() > maxLength)
         {
           maxLength = sarray[s].getLength();
@@ -163,7 +171,7 @@ public class Conservation
 
         for (j = 1; j <= len; j++)
         {
-          sqnum[j] = jalview.schemes.ResidueProperties.aaIndex[sq
+          sqnum[j] = ResidueProperties.aaIndex[sq
                   .charAt(j - 1)];
         }
 
@@ -208,7 +216,7 @@ public class Conservation
 
           if (canonicaliseAa)
           { // lookup the base aa code symbol
-            c = (char) jalview.schemes.ResidueProperties.aaIndex[sequences[j]
+            c = (char) ResidueProperties.aaIndex[sequences[j]
                     .getCharAt(i)];
             if (c > 20)
             {
@@ -217,7 +225,7 @@ public class Conservation
             else
             {
               // recover canonical aa symbol
-              c = jalview.schemes.ResidueProperties.aa[c].charAt(0);
+              c = ResidueProperties.aa[c].charAt(0);
             }
           }
           else
@@ -274,7 +282,7 @@ public class Conservation
                 resultHash.put(type, ht.get("-"));
               }
             }
-            else if (((Integer) resultHash.get(type)).equals((Integer) ht
+            else if (((Integer) resultHash.get(type)).equals(ht
                     .get(res)) == false)
             {
               resultHash.put(type, new Integer(-1));
@@ -315,7 +323,7 @@ public class Conservation
 
       c = sequences[i].getCharAt(j); // gaps do not have upper/lower case
 
-      if (jalview.util.Comparison.isGap((c)))
+      if (Comparison.isGap((c)))
       {
         count++;
       }
@@ -373,7 +381,7 @@ public class Conservation
     {
       gapcons = countConsNGaps(i);
       totGaps = gapcons[1];
-      pgaps = ((float) totGaps * 100) / (float) sequences.length;
+      pgaps = ((float) totGaps * 100) / sequences.length;
       consSymbs[i-start]=new String();
       
       if (percentageGaps > pgaps)
@@ -519,7 +527,7 @@ public class Conservation
     quality = new Vector();
 
     double max = -10000;
-    int[][] BLOSUM62 = jalview.schemes.ResidueProperties.getBLOSUM62();
+    int[][] BLOSUM62 = ResidueProperties.getBLOSUM62();
 
     // Loop over columns // JBPNote Profiling info
     // long ts = System.currentTimeMillis();
@@ -679,7 +687,7 @@ public class Conservation
 
       if (Character.isDigit(c))
       {
-        value = (int) (c - '0');
+        value = c - '0';
       }
       else if (c == '*')
       {