MCPcopy Index your code
hub / github.com/benfry/processing4 / setRow

Method setRow

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

Source from the content-addressed store, hash-verified

2376
2377
2378 public TableRow setRow(int row, TableRow source) {
2379 // Make sure there are enough columns to add this data
2380 ensureBounds(row, source.getColumnCount() - 1);
2381
2382 for (int col = 0; col < Math.min(source.getColumnCount(), columns.length); col++) {
2383 switch (columnTypes[col]) {
2384 case INT:
2385 setInt(row, col, source.getInt(col));
2386 break;
2387 case LONG:
2388 setLong(row, col, source.getLong(col));
2389 break;
2390 case FLOAT:
2391 setFloat(row, col, source.getFloat(col));
2392 break;
2393 case DOUBLE:
2394 setDouble(row, col, source.getDouble(col));
2395 break;
2396 case STRING:
2397 setString(row, col, source.getString(col));
2398 break;
2399 case CATEGORY:
2400 int index = source.getInt(col);
2401 setInt(row, col, index);
2402 if (!columnCategories[col].hasCategory(index)) {
2403 columnCategories[col].setCategory(index, source.getString(col));
2404 }
2405 break;
2406
2407 default:
2408 throw new RuntimeException("no types");
2409 }
2410 }
2411 return new RowPointer(this, row);
2412 }
2413
2414
2415 /**

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