/** * Returns the number of sibling nodes following this node. For the first child node of a given * parent, this is equal to the size of the child list. * * @return number of siblings following */ public int size() { return more == null ? 1 : more.size() + 1; }
private boolean tableHasMoreThanTwoRows() { return (table.parts.size() > 2); } }
private boolean tableHasMoreThanTwoRows() { return (table.parts.size() > 2); } }
public int size() { return more == null ? 1 : more.size() + 1; }
int numberOfRows() { return table.parts.size(); }
public int size() { return more == null ? 1 : more.size() + 1; }
int numberOfRows() { return table.parts.size(); }
void setAlternativeArgs(Parse table) { List<String> argumentList = new ArrayList<>(); Parse columns = table.parts.parts; int size = columns.size(); for (int i = 0; i < size / 2; ++i) { String columnValue = columns.at(i * 2 + 1).text(); columnValue = escapeExpectedAndActualString(columnValue); argumentList.add(columnValue); } args = argumentList.toArray(new String[argumentList.size()]); }
void setAlternativeArgs(Parse table) { List<String> argumentList = new ArrayList<>(); Parse columns = table.parts.parts; int size = columns.size(); for (int i = 0; i < size / 2; ++i) { String columnValue = columns.at(i * 2 + 1).text(); columnValue = escapeExpectedAndActualString(columnValue); argumentList.add(columnValue); } args = argumentList.toArray(new String[argumentList.size()]); }
@Override public void doRows(Parse rows) { firstRow = rows; if (rows == null) throw new FitFailureException("There are no rows in this table"); doStaticTable(rows.size()); }
protected void bindColumnHeadersToMethodsAndFields(Parse heads) { try { columnBindings = new Binding[heads.size()]; for (int i = 0; heads != null; i++, heads = heads.more) { columnBindings[i] = createBinding(i, heads); } } catch (Throwable throwable) { // NOSONAR exception(heads, throwable); } }
@Override public void doRows(Parse rows) { firstRow = rows; if (rows == null) throw new FitFailureException("There are no rows in this table"); doStaticTable(rows.size()); }
protected void bindColumnHeadersToMethodsAndFields(Parse heads) { try { columnBindings = new Binding[heads.size()]; for (int i = 0; heads != null; i++, heads = heads.more) { columnBindings[i] = createBinding(i, heads); } } catch (Throwable throwable) { // NOSONAR exception(heads, throwable); } }
protected void bind (Parse heads) { columnBindings = new TypeAdapter[heads.size()]; for (int i=0; heads!=null; i++, heads=heads.more) { String name = heads.text(); String suffix = "()"; try { if (name.equals("")) { columnBindings[i] = null; } else if (name.endsWith(suffix)) { columnBindings[i] = bindMethod(name.substring(0,name.length()-suffix.length())); } else { columnBindings[i] = bindField(name); } } catch (Exception e) { exception (heads, e); } } }
int rowNumberContainingText(String searchText) throws InvalidInputException { Parse rows = table.at(0, 0); int numberOfRows = rows.size(); for (int i = 0; i < numberOfRows; i++) { Parse columns = table.at(0, i, 0); int numberOfColumns = columns.size(); for (int j = 0; j < numberOfColumns; ++j) { if (searchText.equals(table.at(0, i, j).text())) { return i; } } } throw new InvalidInputException(errorMsg(searchText)); }
int rowNumberContainingText(String searchText) throws InvalidInputException { Parse rows = table.at(0, 0); int numberOfRows = rows.size(); for (int i = 0; i < numberOfRows; i++) { Parse columns = table.at(0, i, 0); int numberOfColumns = columns.size(); for (int j = 0; j < numberOfColumns; ++j) { if (searchText.equals(table.at(0, i, j).text())) { return i; } } } throw new InvalidInputException(errorMsg(searchText)); }