public void setInt(int column, int value) { table.setInt(row, column, value); }
public void setInt(int column, int value) { table.setInt(row, column, value); }
public void setInt(String columnName, int value) { table.setInt(row, columnName, value); }
public void setInt(String columnName, int value) { table.setInt(row, columnName, value); }
/** * @param columnName title of the target column */ public void setInt(int row, String columnName, int value) { setInt(row, getColumnIndex(columnName), value); }
/** * @param columnName title of the target column */ public void setInt(int row, String columnName, int value) { setInt(row, getColumnIndex(columnName), value); }
switch (columnTypes[col]) { case STRING: setString(row, col, rs.getString(col+1)); break; case INT: setInt(row, col, rs.getInt(col+1)); break; case LONG: setLong(row, col, rs.getLong(col+1)); break; case FLOAT: setFloat(row, col, rs.getFloat(col+1)); break;
switch (columnTypes[col]) { case STRING: setString(row, col, rs.getString(col+1)); break; case INT: setInt(row, col, rs.getInt(col+1)); break; case LONG: setLong(row, col, rs.getLong(col+1)); break; case FLOAT: setFloat(row, col, rs.getFloat(col+1)); break;
case CATEGORY: case INT: setInt(row, col, source.getInt(col)); break; case LONG:
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }