public CellRange(int row1, int col1, int row2, int col2) { rangeCheck(row1, col1); rangeCheck(row2, col2); m_row1 = row1; m_col1 = col1; m_row2 = row2; m_col2 = col2; rangeOrder(); }
public void parse(String s) { // A4:C5 int p; if ((p = s.indexOf(':')) >= 0) { int[] a = parseItem(s.substring(0, p)); m_row1 = a[0]; m_col1 = a[1]; a = parseItem(s.substring(p + 1)); m_row2 = a[0]; m_col2 = a[1]; } else { int[] a = parseItem(s); m_row1 = a[0]; m_col1 = a[1]; m_row2 = m_row1; m_col2 = m_col1; } rangeOrder(); }