📄 data.java
字号:
package net.openai.ai.nn.parser;import java.util.*;public class Data { // the column names for this data private Vector columnNames = null; // rows of data private Vector rows = null; public Data() { columnNames = new Vector(); rows = new Vector(); } /** * Get the column names for this data. * * @return Vector List of column names for the data. */ public Vector getColumnNames() { return columnNames; } /** * Set the column names for this data. * * @param columnNames The list of column names for this data. */ public void setColumnNames(Vector columnNames) { if(columnNames != null) this.columnNames = columnNames; } /** * Add a column name to the list. * * @param columnName The name to add to the columns name list. */ public void addColumnName(String columnName) { if(columnName != null) columnNames.addElement(columnName); } /** * Get the rows of data. * * @return Vector The rows of data. */ public Vector getRows() { return rows; } /** * Set the rows of data. * * @param rows The rows of data to be set. */ public void setRows(Vector rows) { if(rows != null) this.rows = rows; } /** * Add a single row of data. * * @param row The row of data to add. */ public void addRow(Vector row) { if(row != null) rows.addElement(row); } /** * Returns a String of the columns and the data. * * @return String String representation of this object. */ public String toString() { String data = columnNames.toString() + "\n"; int size = rows.size(); for(int i = 0; i < size; i++) { Vector row = (Vector) rows.elementAt(i); data += row.toString() + "\n"; } return data; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -