JAL-98 typo in javadoc
[jalview.git] / src / jalview / analysis / ResidueCount.java
index cd35206..351c927 100644 (file)
@@ -95,7 +95,7 @@ public class ResidueCount
 
   /*
    * keeps track of the maximum count value recorded
-   * (if this class every allows decrements, would need to
+   * (if this class ever allows decrements, would need to
    * calculate this on request instead) 
    */
   int maxCount;
@@ -403,8 +403,8 @@ public class ResidueCount
   /**
    * Returns the character (or concatenated characters) for the symbol(s) with
    * the given count in the profile. Can be used to get the modal residue by
-   * supplying the modal count value. Returns an empty string if symbol has the
-   * given count. The symbols are in alphabetic order of standard peptide or
+   * supplying the modal count value. Returns an empty string if no symbol has
+   * the given count. The symbols are in alphabetic order of standard peptide or
    * nucleotide characters, followed by 'other' symbols if any.
    * 
    * @return
@@ -494,6 +494,11 @@ public class ResidueCount
         }
       }
     }
+
+    /*
+     * include 'other' characters recorded (even if count is zero
+     * though that would be a strange use case)
+     */
     if (otherData != null)
     {
       size += otherData.size();
@@ -510,8 +515,9 @@ public class ResidueCount
    */
   public SymbolCounts getSymbolCounts()
   {
-    char[] symbols = new char[size()];
-    int[] values = new int[size()];
+    int size = size();
+    char[] symbols = new char[size];
+    int[] values = new int[size];
     int j = 0;
 
     if (useIntCounts)