MCPcopy Index your code
hub / github.com/processing/processing / setRow

Method setRow

core/src/processing/data/Table.java:2335–2369  ·  view source on GitHub ↗
(int row, TableRow source)

Source from the content-addressed store, hash-verified

2333
2334
2335 public TableRow setRow(int row, TableRow source) {
2336 // Make sure there are enough columns to add this data
2337 ensureBounds(row, source.getColumnCount() - 1);
2338
2339 for (int col = 0; col < Math.min(source.getColumnCount(), columns.length); col++) {
2340 switch (columnTypes[col]) {
2341 case INT:
2342 setInt(row, col, source.getInt(col));
2343 break;
2344 case LONG:
2345 setLong(row, col, source.getLong(col));
2346 break;
2347 case FLOAT:
2348 setFloat(row, col, source.getFloat(col));
2349 break;
2350 case DOUBLE:
2351 setDouble(row, col, source.getDouble(col));
2352 break;
2353 case STRING:
2354 setString(row, col, source.getString(col));
2355 break;
2356 case CATEGORY:
2357 int index = source.getInt(col);
2358 setInt(row, col, index);
2359 if (!columnCategories[col].hasCategory(index)) {
2360 columnCategories[col].setCategory(index, source.getString(col));
2361 }
2362 break;
2363
2364 default:
2365 throw new RuntimeException("no types");
2366 }
2367 }
2368 return new RowPointer(this, row);
2369 }
2370
2371
2372 /**

Callers 7

TableMethod · 0.95
parseBasicMethod · 0.95
addRowMethod · 0.95
addRowsMethod · 0.95
insertRowMethod · 0.95
nextMethod · 0.45
nextMethod · 0.45

Calls 15

ensureBoundsMethod · 0.95
setIntMethod · 0.95
setLongMethod · 0.95
setFloatMethod · 0.95
setDoubleMethod · 0.95
setStringMethod · 0.95
setRowColMethod · 0.95
setCategoryMethod · 0.80
getColumnCountMethod · 0.65
getIntMethod · 0.65
getLongMethod · 0.65
getFloatMethod · 0.65

Tested by

no test coverage detected