@Test public void testA2() throws ParseException, UnsupportedEncodingException { Assert.assertEquals(new RangeRef(null, A1, new LocalCellRef(1, 0, 0)), this.parser.parse("A1:A2")); }
public RangeRef parse(final String address) throws ParseException, UnsupportedEncodingException { final int tableSepIndex = address.lastIndexOf(TABLE_CELL_SEP); final String localRangeAddress; final TableRef tableRef; if (tableSepIndex == -1) { tableRef = null; localRangeAddress = address; } else { final String tableAddress = address.substring(0, tableSepIndex); tableRef = this.tableAddressParser.parse(tableAddress); localRangeAddress = address.substring(tableSepIndex + 1); } final int colonSepIndex = localRangeAddress.indexOf(RANGE_SEP); if (colonSepIndex == -1) { throw new ParseException("Expected a `:` symbol: " + localRangeAddress, 0); } final LocalCellRef localFromCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(0, colonSepIndex)); final LocalCellRef localToCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(colonSepIndex + 1)); return new RangeRef(tableRef, localFromCellRef, localToCellRef); }
RangeAddressParser { public RangeRef parse(final String address) throws ParseException, UnsupportedEncodingException { final int tableSepIndex = address.lastIndexOf(TABLE_CELL_SEP); final String localRangeAddress; final TableRef tableRef; if (tableSepIndex == -1) { tableRef = null; localRangeAddress = address; } else { final String tableAddress = address.substring(0, tableSepIndex); tableRef = this.tableAddressParser.parse(tableAddress); localRangeAddress = address.substring(tableSepIndex + 1); } final int colonSepIndex = localRangeAddress.indexOf(RANGE_SEP); if (colonSepIndex == -1) { throw new ParseException("Expected a `:` symbol: " + localRangeAddress, 0); } final LocalCellRef localFromCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(0, colonSepIndex)); final LocalCellRef localToCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(colonSepIndex + 1)); return new RangeRef(tableRef, localFromCellRef, localToCellRef); } }
RangeAddressParser { public RangeRef parse(final String address) throws ParseException, UnsupportedEncodingException { final int tableSepIndex = address.lastIndexOf(TABLE_CELL_SEP); final String localRangeAddress; final TableRef tableRef; if (tableSepIndex == -1) { tableRef = null; localRangeAddress = address; } else { final String tableAddress = address.substring(0, tableSepIndex); tableRef = this.tableAddressParser.parse(tableAddress); localRangeAddress = address.substring(tableSepIndex + 1); } final int colonSepIndex = localRangeAddress.indexOf(RANGE_SEP); if (colonSepIndex == -1) { throw new ParseException("Expected a `:` symbol: " + localRangeAddress, 0); } final LocalCellRef localFromCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(0, colonSepIndex)); final LocalCellRef localToCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(colonSepIndex + 1)); return new RangeRef(tableRef, localFromCellRef, localToCellRef); } RangeAddressParser(final TableAddressParser tableAddressParser,
                              final LocalCellAddressParser localCellAddressParser); }
RangeAddressParser { public RangeRef parse(final String address) throws ParseException, UnsupportedEncodingException { final int tableSepIndex = address.lastIndexOf(TABLE_CELL_SEP); final String localRangeAddress; final TableRef tableRef; if (tableSepIndex == -1) { tableRef = null; localRangeAddress = address; } else { final String tableAddress = address.substring(0, tableSepIndex); tableRef = this.tableAddressParser.parse(tableAddress); localRangeAddress = address.substring(tableSepIndex + 1); } final int colonSepIndex = localRangeAddress.indexOf(RANGE_SEP); if (colonSepIndex == -1) { throw new ParseException("Expected a `:` symbol: " + localRangeAddress, 0); } final LocalCellRef localFromCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(0, colonSepIndex)); final LocalCellRef localToCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(colonSepIndex + 1)); return new RangeRef(tableRef, localFromCellRef, localToCellRef); } RangeAddressParser(final TableAddressParser tableAddressParser,
                              final LocalCellAddressParser localCellAddressParser); static RangeAddressParser create(final TableNameUtil tableNameUtil); RangeRef parse(final String address); }
RangeAddressParser { public RangeRef parse(final String address) throws ParseException, UnsupportedEncodingException { final int tableSepIndex = address.lastIndexOf(TABLE_CELL_SEP); final String localRangeAddress; final TableRef tableRef; if (tableSepIndex == -1) { tableRef = null; localRangeAddress = address; } else { final String tableAddress = address.substring(0, tableSepIndex); tableRef = this.tableAddressParser.parse(tableAddress); localRangeAddress = address.substring(tableSepIndex + 1); } final int colonSepIndex = localRangeAddress.indexOf(RANGE_SEP); if (colonSepIndex == -1) { throw new ParseException("Expected a `:` symbol: " + localRangeAddress, 0); } final LocalCellRef localFromCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(0, colonSepIndex)); final LocalCellRef localToCellRef = this.localCellAddressParser.parse(localRangeAddress.substring(colonSepIndex + 1)); return new RangeRef(tableRef, localFromCellRef, localToCellRef); } RangeAddressParser(final TableAddressParser tableAddressParser,
                              final LocalCellAddressParser localCellAddressParser); static RangeAddressParser create(final TableNameUtil tableNameUtil); RangeRef parse(final String address);  }