public class AnnotationRenderer
{
+ private static final int UPPER_TO_LOWER = 'a' - 'A'; // 32
+
+ private static final int CHAR_A = 'A'; // 65
+
+ private static final int CHAR_Z = 'Z'; // 90
+
/**
* flag indicating if timing and redraw parameter info should be output
*/
}
}
- if (ss >= 65)
+ if (isRNA && (ss >= CHAR_A) && (ss <= CHAR_Z))
{
// distinguish between forward/backward base-pairing
- if (displayChar.indexOf(ss + 32) > -1)
+ int ssLowerCase = ss + UPPER_TO_LOWER;
+ // TODO would .equals() be safer here? or charAt(0)?
+ if (displayChar.indexOf(ssLowerCase) > -1)
{
-
- ss = (char) (ss + 32);
-
+ ss = (char) ssLowerCase;
}
}