private int getRowIndex(String name) { int nameIndex; List<String> headers = select(rows().headers(), String::toLowerCase); String lName = name.toLowerCase(); if (headers != null && headers.contains(lName)) nameIndex = headers.indexOf(lName); else throw exception("Can't Get Row: '%s'. Available RowHeaders: (%s)", name, print(headers, ", ", "'%s'")); return nameIndex + rows().getStartIndex(); }
private int getRowIndex(String name) { int nameIndex; List<String> headers = select(rows().headers(), String::toLowerCase); String lName = name.toLowerCase(); if (headers != null && headers.contains(lName)) nameIndex = headers.indexOf(lName); else throw exception("Can't Get Row: '%s'. Available RowHeaders: (%s)", name, print(headers, ", ", "'%s'")); return nameIndex + rows().getStartIndex(); }
private int getRowIndex(String name) { int nameIndex; List<String> headers = rows().headers(); if (headers != null && headers.contains(name)) nameIndex = headers.indexOf(name); else throw exception("Can't Get Row: '%s'. Available RowHeaders: (%s)", name, print(headers, ", ", "'{0}'")); return nameIndex + rows().getStartIndex(); }
public ICell cell(Column column, Row row) { int colIndex = column.get(this::getColumnIndex, num -> num + columns().getStartIndex() - 1); int rowIndex = row.get(this::getRowIndex, num -> num + rows().getStartIndex() - 1); return addCell(colIndex, rowIndex, column.get(columnName -> columns().headers().indexOf(columnName) + 1, num -> num), row.get(rowName -> rows().headers().indexOf(rowName) + 1, num -> num), column.get(columnName -> columnName, num -> ""), row.get(rowName -> rowName, num -> "")); }
public ICell cell(Column column, Row row) { int colIndex = column.get(this::getColumnIndex, num -> num + columns().getStartIndex() - 1); int rowIndex = row.get(this::getRowIndex, num -> num + rows().getStartIndex() - 1); return addCell(colIndex, rowIndex, column.get(columnName -> columns().headers().indexOf(columnName) + 1, num -> num), row.get(rowName -> rows().headers().indexOf(rowName) + 1, num -> num), column.get(columnName -> columnName, num -> ""), row.get(rowName -> rowName, num -> "")); }
public ICell cell(Column column, Row row) { int colIndex = column.get(this::getColumnIndex, num -> num + columns().getStartIndex() - 1); int rowIndex = row.get(this::getRowIndex, num -> num + rows().getStartIndex() - 1); return addCell(colIndex, rowIndex, column.get(name -> columns().headers().indexOf(name) + 1, num -> num), row.get(name -> rows().headers().indexOf(name) + 1, num -> num), column.get(name -> name, num -> ""), row.get(name -> name, num -> "")); }
Cell(int columnNum, int rowNum, String colName, String rowName, Table table) { this.columnNum = columnNum; this.rowNum = rowNum; this.columnName = colName; this.rowName = rowName; int colIndex = columnNum - 1 + table.columns().getStartIndex(); int rowIndex = rowNum - 1 + table.rows().getStartIndex(); if (table.cellLocatorTemplate != null) setLocator(fillByMsgTemplate(table.cellLocatorTemplate, colIndex, rowIndex)); else { if (table.rows().locatorChanged()) getFunc = () -> table.row(rowNum).get(columnNum-1).value; else { if (table.columns().locatorChanged()) getFunc = () -> table.column(columnNum).get(rowNum-1).value; }} if (!hasLocator() && getFunc == null) setLocator(fillByMsgTemplate(defaultLocator, columnNum, rowNum)); this.table = table; }
Cell(int columnNum, int rowNum, String colName, String rowName, Table table) { this.columnNum = columnNum; this.rowNum = rowNum; this.columnName = colName; this.rowName = rowName; int colIndex = columnNum - 1 + table.columns().getStartIndex(); int rowIndex = rowNum - 1 + table.rows().getStartIndex(); if (table.cellLocatorTemplate != null) setLocator(fillByMsgTemplate(table.cellLocatorTemplate, colIndex, rowIndex)); else { if (table.rows().locatorChanged()) getFunc = () -> table.row(rowNum).get(columnNum-1).value; else { if (table.columns().locatorChanged()) getFunc = () -> table.column(columnNum).get(rowNum-1).value; }} if (!hasLocator() && getFunc == null) setLocator(fillByMsgTemplate(defaultLocator, columnNum, rowNum)); this.table = table; }