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

Method setColumnCount

core/src/processing/data/Table.java:1955–1971  ·  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

1953 * @param newCount
1954 */
1955 public void setColumnCount(int newCount) {
1956 int oldCount = columns.length;
1957 if (oldCount != newCount) {
1958 columns = (Object[]) PApplet.expand(columns, newCount);
1959 // create new columns, default to String as the data type
1960 for (int c = oldCount; c < newCount; c++) {
1961 columns[c] = new String[rowCount];
1962 }
1963
1964 if (columnTitles != null) {
1965 columnTitles = PApplet.expand(columnTitles, newCount);
1966 }
1967 columnTypes = PApplet.expand(columnTypes, newCount);
1968 columnCategories = (HashMapBlows[])
1969 PApplet.expand(columnCategories, newCount);
1970 }
1971 }
1972
1973
1974 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