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

Method createSubset

core/src/processing/data/Table.java:4688–4707  ·  view source on GitHub ↗
(int[] rowSubset)

Source from the content-addressed store, hash-verified

4686
4687 // TODO naming/whether to include
4688 protected Table createSubset(int[] rowSubset) {
4689 Table newbie = new Table();
4690 newbie.setColumnTitles(columnTitles); // also sets columns.length
4691 newbie.columnTypes = columnTypes;
4692 newbie.setRowCount(rowSubset.length);
4693
4694 for (int i = 0; i < rowSubset.length; i++) {
4695 int row = rowSubset[i];
4696 for (int col = 0; col < columns.length; col++) {
4697 switch (columnTypes[col]) {
4698 case STRING: newbie.setString(i, col, getString(row, col)); break;
4699 case INT: newbie.setInt(i, col, getInt(row, col)); break;
4700 case LONG: newbie.setLong(i, col, getLong(row, col)); break;
4701 case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break;
4702 case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break;
4703 }
4704 }
4705 }
4706 return newbie;
4707 }
4708
4709
4710 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers

nothing calls this directly

Calls 12

setColumnTitlesMethod · 0.95
setRowCountMethod · 0.95
setStringMethod · 0.95
getStringMethod · 0.95
setIntMethod · 0.95
getIntMethod · 0.95
setLongMethod · 0.95
getLongMethod · 0.95
setFloatMethod · 0.95
getFloatMethod · 0.95
setDoubleMethod · 0.95
getDoubleMethod · 0.95

Tested by

no test coverage detected