/*
* 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;
/**
* 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
}
}
}
+
+ /*
+ * include 'other' characters recorded (even if count is zero
+ * though that would be a strange use case)
+ */
if (otherData != null)
{
size += otherData.size();
*/
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)