Sequence is char []
[jalview.git] / src / jalview / schemes / ResidueColourScheme.java
index b905c45..df90500 100755 (executable)
@@ -75,21 +75,20 @@ public class ResidueColourScheme implements ColourSchemeI
     /**\r
     * Find a colour without an index in a sequence\r
     */\r
-   public Color findColour(String aa)\r
+   public Color findColour(char c)\r
    {\r
-       return colors[ResidueProperties.aaIndex[aa.charAt(0)]];\r
+       return colors[ResidueProperties.aaIndex[c]];\r
    }\r
 \r
 \r
 \r
-   public Color findColour(String s, int j)\r
+   public Color findColour(char c, int j)\r
    {\r
        Color currentColour;\r
-       int index = ResidueProperties.aaIndex[s.charAt(0)];\r
 \r
-       if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))\r
+       if ((threshold == 0) || aboveThreshold(c, j))\r
        {\r
-           currentColour = colors[index];\r
+           currentColour = colors[ResidueProperties.aaIndex[c]];\r
        }\r
        else\r
        {\r
@@ -136,22 +135,20 @@ public class ResidueColourScheme implements ColourSchemeI
      *\r
      * @return DOCUMENT ME!\r
      */\r
-    public boolean aboveThreshold(String s, int j)\r
+    public boolean aboveThreshold(char c, int j)\r
     {\r
-      char c = s.charAt(0);\r
       if ('a' <= c && c <= 'z')\r
         {\r
           // TO UPPERCASE !!!\r
           //Faster than toUpperCase\r
           c -= ('a' - 'A');\r
-          s = String.valueOf(c);\r
         }\r
 \r
         if (consensus == null || consensus[j] == null)\r
           return false;\r
 \r
         if ( ( ( (Integer) consensus[j].get(AAFrequency.MAXCOUNT)).intValue() != -1) &&\r
-            consensus[j].contains(s))\r
+            consensus[j].contains(String.valueOf(c)))\r
         {\r
           if ( ( (Float) consensus[j].get(ignoreGaps)).floatValue() >= threshold)\r
           {\r