public SequenceGroup getCurrentSequenceGroup(SequenceGroup[] allGroups,
int res)
{
- if (allGroups == null)
+ int n;
+ if (allGroups == null || (n = allGroups.length) == 0)
{
return null;
}
- for (int i = 0; i < allGroups.length; i++)
+ for (int i = 0; i < n; i++)
{
if ((allGroups[i].getStartRes() <= res)
&& (allGroups[i].getEndRes() >= res))