/** * Create a dictionary that maps between column titles and cell entries * in a TableRow. If two columns have the same name, the later column's * values will override the earlier values. */ public StringDict(TableRow row) { this(row.getColumnCount()); String[] titles = row.getColumnTitles(); if (titles == null) { titles = new StringList(IntList.fromRange(row.getColumnCount())).array(); } for (int col = 0; col < row.getColumnCount(); col++) { set(titles[col], row.getString(col)); } // remove unused and overwritten entries crop(); }
public TableRow setRow(int row, TableRow source) { ensureBounds(row, source.getColumnCount() - 1); for (int col = 0; col < Math.min(source.getColumnCount(), columns.length); col++) { switch (columnTypes[col]) { case INT:
Variable var = allvars.get(r); TableRow row = dict.getRow(r); int count = row.getColumnCount(); String alias = row.getString(0); var.setAlias(alias);
int row = rowCount; ensureBounds(row, source.getColumnCount() - 1);
setColumnCount(incoming.getColumnCount());