boolean first = true; int max = -1; for (int i=1;i<sel.size();i++) { Range r = (Range) sel.get(i);  if (first) { max = r.i1; } else { if (r.i1 > max) { max = r.i1; } } } return max; }
int mx = -1; for(int i=sel.nextSetBit(0); i >= 0; i=sel.nextSetBit(i+1)) { mx = i; } return mx; }
    public int getMaxSelectionIndex()    {	if (isSelectionEmpty())	    return -1;	boolean first = true;	int max = -1;	for (int i=1;i<sel.size();i++)	    {		Range r = (Range) sel.get(i);				if (first)		    {			max = r.i1;		    }		else		    {			if (r.i1 > max)			    {				max = r.i1;			    }		    }	    }	return max;    }