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

Method setRowCount

core/src/processing/data/Table.java:2282–2311  ·  view source on GitHub ↗
(int newCount)

Source from the content-addressed store, hash-verified

2280
2281
2282 public void setRowCount(int newCount) {
2283 if (newCount != rowCount) {
2284 if (newCount > 1000000) {
2285 System.out.print("Note: setting maximum row count to " + PApplet.nfc(newCount));
2286 }
2287 long t = System.currentTimeMillis();
2288 for (int col = 0; col < columns.length; col++) {
2289 switch (columnTypes[col]) {
2290 case INT: columns[col] = PApplet.expand((int[]) columns[col], newCount); break;
2291 case LONG: columns[col] = PApplet.expand((long[]) columns[col], newCount); break;
2292 case FLOAT: columns[col] = PApplet.expand((float[]) columns[col], newCount); break;
2293 case DOUBLE: columns[col] = PApplet.expand((double[]) columns[col], newCount); break;
2294 case STRING: columns[col] = PApplet.expand((String[]) columns[col], newCount); break;
2295 case CATEGORY: columns[col] = PApplet.expand((int[]) columns[col], newCount); break;
2296 }
2297 if (newCount > 1000000) {
2298 try {
2299 Thread.sleep(10); // gc time!
2300 } catch (InterruptedException e) {
2301 e.printStackTrace();
2302 }
2303 }
2304 }
2305 if (newCount > 1000000) {
2306 int ms = (int) (System.currentTimeMillis() - t);
2307 System.out.println(" (resize took " + PApplet.nfc(ms) + " ms)");
2308 }
2309 }
2310 rowCount = newCount;
2311 }
2312
2313
2314 /**

Callers 10

TableMethod · 0.95
parseBasicMethod · 0.95
loadBinaryMethod · 0.95
clearRowsMethod · 0.95
addRowMethod · 0.95
addRowsMethod · 0.95
trimMethod · 0.95
ensureRowMethod · 0.95
createSubsetMethod · 0.95
clearRowsMethod · 0.80

Calls 5

nfcMethod · 0.95
expandMethod · 0.95
printMethod · 0.65
printStackTraceMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected