Method Summary |
|
public void | addColumnValue(String column, Object value) Adds a value into the Data set at the current row, using a column name to
find the column in which to insert the new value. |
public void | addHeader(String s) Adds a header name to the Data object. |
public void | addRow() |
public void | append(Data d) Adds the rows of the given Data object to this Data object. |
public int | findValue(String column, Object value) Returns the row number where a certain value is.
Parameters: column - column to be searched for value. Parameters: value - object in Search of. |
public String[] | getColumn(String columnName) This method will retrieve every entry in a certain column. |
public List | getColumnAsObjectArray(String columnName) This method will retrieve every entry in a certain column. |
public Object | getColumnValue(String column) Gets the value in the current row of the given column.
Parameters: column - name of the column. |
public Object | getColumnValue(int column) Gets the value in the current row of the given column.
Parameters: column - index of the column (starts at 0). |
public Object | getColumnValue(int column, int row) |
public int | getCurrentPos() Get the number of the current row. |
public String[] | getDataAsText() Returns all the data in the Data set as an array of strings. |
public static Data | getDataFromResultSet(ResultSet rs) Gets a Data object from a ResultSet. |
public int | getHeaderCount() |
public String[] | getHeaders() Returns a String array of the column headers. |
public boolean | hasHeader(String column) Checks to see if a column exists in the Data object.
Parameters: column - Name of column header to check for. |
public boolean | next() Sets the current position of the Data set to the next row.
True if there is another row. |
public boolean | previous() Sets the current position of the Data set to the previous row.
True if there is another row. |
public void | removeColumn(int col) |
public void | removeRow() Removes the current row. |
public void | removeRow(int index) |
public void | replaceHeader(String oldHeader, String newHeader) Replaces the given header name with a new header name. |
public void | reset() Resets the current position of the data set to just before the first
element. |
public void | setColumnData(String colName, Object value) Sets the data for every row in the column. |
public void | setColumnData(int col, List data) |
public void | setColumnValue(String column, Object value) Sets the value in the Data set at the current row, using a column name to
find the column in which to insert the new value. |
public void | setCurrentPos(int r) Sets the current pos. |
public void | setData(String[] contents, String delimiter) Use this method to set the entire data set. |
public void | setHeaders(String[] h) Sets the headers for the data set. |
public void | setLine(String[] line) Sets a row of data using an array of strings as input. |
public void | setLine(String[] line, String deflt) Sets a row of data using an array of strings as input. |
public int | size() Gets the number of rows in the Data object. |
public void | sort(String column, boolean asc) Sorts the data using a given row as the sorting criteria. |
public String | toString() |