public ICell cellMatch(String regex) { ICell result; for (Pair<String, MapArray<String, ICell>> row : rows().get()) { result = row.value.first((cName, cValue) -> cValue.getText().matches(regex)); if (result != null) return result; } return null; } public MapArray<String, MapArray<String, ICell>> rows(String value, Column column) {
public ICell cell(String value) { ICell result; for (Pair<String, MapArray<String, ICell>> row : rows().get()) { result = row.value.first((cName, cValue) -> cValue.getText().equals(value)); if (result != null) return result; } return null; }
public ICell cell(String value) { ICell result; for (Pair<String, MapArray<String, ICell>> row : rows().get()) { result = row.value.first((cName, cValue) -> cValue.getText().equals(value)); if (result != null) return result; } return null; }
public ICell cellMatch(String regex) { ICell result; for (Pair<String, MapArray<String, ICell>> row : rows().get()) { result = row.value.first((cName, cValue) -> cValue.getText().matches(regex)); if (result != null) return result; } return null; } public MapArray<String, MapArray<String, ICell>> rows(String value, Column column) {
public ICell cellMatch(String regex) { ICell result; for (Pair<String, MapArray<String, ICell>> row : rows().get()) { result = row.value.first((cName, cValue) -> cValue.getText().matches(regex)); if (result != null) return result; } return null; } public MapArray<String, MapArray<String, ICell>> rows(String value, Column column) {
public ICell cell(String value) { ICell result; for (Pair<String, MapArray<String, ICell>> row : rows().get()) { result = row.value.first((cName, cValue) -> cValue.getText().equals(value)); if (result != null) return result; } return null; }
public List<R> getRows() { return select(rows().get(), row -> castToRow(row.value)); }
public List<R> getRows() { return select(rows().get(), row -> castToRow(row.value)); }
public List<R> getRows() { return select(rows().get(), row -> castToRow(row.value)); }
public MapArray<String, MapArray<String, ICell>> rows(String... colNameValues) { if (colNameValues.length == 0) return rows().get(); List<TableFilter> filters = new ArrayList<>(); for (String colNameValue : colNameValues) boolean matches = false; MapArray<String, MapArray<String, ICell>> result = new MapArray<>(); for (Pair<String, MapArray<String, ICell>> row : rows().get()) { for (TableFilter filter : filters) { ICell cell = row.value.get(filter.name);
public MapArray<String, MapArray<String, ICell>> rows(String... colNameValues) { if (colNameValues.length == 0) return rows().get(); List<TableFilter> filters = new ArrayList<>(); for (String colNameValue : colNameValues) boolean matches = false; MapArray<String, MapArray<String, ICell>> result = new MapArray<>(); for (Pair<String, MapArray<String, ICell>> row : rows().get()) { for (TableFilter filter : filters) { ICell cell = row.value.get(filter.name);
public MapArray<String, MapArray<String, ICell>> rows(String... colNameValues) { List<TableFilter> filters = new ArrayList<>(); for (String colNameValue : colNameValues) filters.add(new TableFilter(colNameValue)); boolean matches = false; MapArray<String, MapArray<String, ICell>> result = new MapArray<>(); for (Pair<String, MapArray<String, ICell>> row : rows().get()) { for (TableFilter filter : filters) { ICell cell = row.value.get(filter.name); if (cell == null) throw exception(format("Search rows for '%s' failed. Can't get cell for column named %s", print(colNameValues), filter.name)); switch (filter.type) { case EQUAL: matches = cell.getValue().equals(filter.value); break; case CONTAINS: matches = cell.getValue().contains(filter.value); break; default: matches = cell.getValue().matches(filter.value); break; } if (!matches) break; } if (matches) result.add(row); } return result; }