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

Method setColumnCount

core/src/processing/data/Table.java:1924–1940  ·  view source on GitHub ↗

Change the number of columns in this table. Resizes all rows to ensure the same number of columns in each row. Entries in the additional (empty) columns will be set to null. @param newCount

(int newCount)

Source from the content-addressed store, hash-verified

1922 * @param newCount
1923 */
1924 public void setColumnCount(int newCount) {
1925 int oldCount = columns.length;
1926 if (oldCount != newCount) {
1927 columns = (Object[]) PApplet.expand(columns, newCount);
1928 // create new columns, default to String as the data type
1929 for (int c = oldCount; c < newCount; c++) {
1930 columns[c] = new String[rowCount];
1931 }
1932
1933 if (columnTitles != null) {
1934 columnTitles = PApplet.expand(columnTitles, newCount);
1935 }
1936 columnTypes = PApplet.expand(columnTypes, newCount);
1937 columnCategories = (HashMapBlows[])
1938 PApplet.expand(columnCategories, newCount);
1939 }
1940 }
1941
1942
1943 public void setColumnType(String columnName, String columnType) {

Callers 4

TableMethod · 0.95
loadBinaryMethod · 0.95
trimMethod · 0.95
ensureColumnMethod · 0.95

Calls 1

expandMethod · 0.95

Tested by

no test coverage detected