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

Class Table

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

Table objects store data with multiple rows and columns, much like in a traditional spreadsheet. Tables can be generated from scratch, dynamically, or using data from an existing file. Tables can also be output and saved to disk, as in the example above. Additional Table m

Source from the content-addressed store, hash-verified

82 * @see TableRow
83 */
84public class Table {
85 protected int rowCount;
86
87 protected String missingString = null;
88 protected int missingInt = 0;
89 protected long missingLong = 0;
90 protected float missingFloat = Float.NaN;
91 protected double missingDouble = Double.NaN;
92 protected int missingCategory = -1;
93
94 String[] columnTitles;
95 HashMapBlows[] columnCategories;
96 HashMap<String, Integer> columnIndices;
97
98 protected Object[] columns; // [column]
99
100 // accessible for advanced users
101 static public final int STRING = 0;
102 static public final int INT = 1;
103 static public final int LONG = 2;
104 static public final int FLOAT = 3;
105 static public final int DOUBLE = 4;
106 static public final int CATEGORY = 5;
107 int[] columnTypes;
108
109 protected RowIterator rowIterator;
110
111 // 0 for doubling each time, otherwise the number of rows to increment on
112 // each expansion.
113 protected int expandIncrement;
114
115
116 /**
117 * Creates a new, empty table. Use addRow() to add additional rows.
118 */
119 public Table() {
120 init();
121 }
122
123 /**
124 * @nowebref
125 */
126 public Table(File file) throws IOException {
127 this(file, null);
128 }
129
130
131 /**
132 * version that uses a File object; future releases (or data types)
133 * may include additional optimizations here
134 *
135 * @nowebref
136 */
137 public Table(File file, String options) throws IOException {
138 // uses createInput() to handle .gz (and eventually .bz2) files
139 init();
140 parse(PApplet.createInput(file),
141 extensionOptions(true, file.getName(), options));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected