|
MDi JLib 1.7.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.microdeveloper.data.ArrayResultSet
public class ArrayResultSet
An arbitrary class for simulating a simple String resultset as a two dimensional array which can be transcribed into a series suitable for most charting applets and other similar usages. Most methods have more than one form for convenience but are otherwise identical (e.g., getColCount <-> getWidth are the same).
Series are always represented as comma delimited records with each row representing a full comma delimited record. Changes to the result set are automatically reflected in the series.
| Constructor Summary | |
|---|---|
ArrayResultSet()
Constructor ChartData |
|
ArrayResultSet(int row,
int col)
Creates a new blank ArrayResultSet |
|
ArrayResultSet(Object[][] objArray)
Creates a new ArrayResultSet and initializes it |
|
| Method Summary | |
|---|---|
String[][] |
getArrayResultSet()
Returns the entire resultset |
int |
getColCount()
Returns the current width of the ResultSet (number of columns). |
String |
getField(int row,
int col)
Returns the current value of a given column in a given row |
String[] |
getRecord(int row)
Gets a single record that is n columns wide |
String[] |
getRow(int row)
Gets a single record that is n columns wide |
int |
getRowCount()
Length [size] of the resultset (number of rows) |
String[] |
getSeries()
Returns the result set as a series with each row representing a complete record which is comma delimited |
String |
getSeriesRow(int row)
Returns a single series row that is represented as a single comma delimited String |
int |
length()
Length [size] of the resultset (number of rows) |
void |
reset()
Resets the contents of the resultset to null and forces garbage collection |
void |
resizeArrayRecordSet(int rows,
int cols)
Trims the resultset to the given size in rows and columns |
void |
setField(int row,
int col,
String val)
Sets the value of a specific column in a specific record |
int |
width()
Returns the current width of the ResultSet (number of columns) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayResultSet()
public ArrayResultSet(int row,
int col)
row - initial number of rowscol - initial number of columnspublic ArrayResultSet(Object[][] objArray)
objArray - content to initialize the object with| Method Detail |
|---|
public String getField(int row,
int col)
row - index of the record to retrievecol - index of the column to retrieve
public void setField(int row,
int col,
String val)
row - index of the record to changecol - index of the column to changeval - value to assign to the column/recordpublic String[][] getArrayResultSet()
public String[] getRow(int row)
row - index of the row to return
getRecord(int)public String[] getRecord(int row)
row - index of the row to return
getRow(int)
public void resizeArrayRecordSet(int rows,
int cols)
rows - rows to trim tocols - columns to trim topublic String getSeriesRow(int row)
row - index of the row to return
public String[] getSeries()
public int getRowCount()
length()public int length()
getRowCount()public int width()
getColCount()public int getColCount()
width()public void reset()
|
MDi JLib 1.7.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||