|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.AbleObject | +--com.ibm.able.beans.AbleDataTable
Class to maintain a set of tabular data, maintained in named columns (represented internally as an array of AbleDataSeries). The constructors allow the data to be added one record at a time, or via a String[] of records, or by reading a space (0x20), tab (0x09) or comma (0x2c) delimited data (similar to what you'd pass to a Spreadsheet or Database import facility). The data may comprise Integer, Double, or Strings which are maintained internally as int[], double[], or String[] in the AbleDataSeries. Using native variable types improves speed when calculating statistics on numeric information (e.g., min, max, average, standard deviation). Columns of data may be retrieved as native arrays or as AbleDataSeries. When retrieved as an array of doubles (double[]), the columnar data may be used with the AbleDataAnalytics methods in the com.ibm.able.rules package. This enables time series analysis of the data if one of the columns represents time ordering (as some sorted, monotonically numeric increasing value). The class provides an option to maintain history as values are added, or to defer calculation of statistics until they are requested. Once calculated, if no changes are made to the values, no calculation is necessary. Until locked, the history grows in increments to expand the capacity to reduce array copying. Once locked, new additions overwrite the oldest value in the history.
AbleDataSeries
,
AbleDataAnalytics
, Serialized FormField Summary | |
---|---|
static java.lang.Class |
classClass
Class used to signify the initial object passed to identify the "kind" of data to be maintained is not acceptable (e.g., not an Integer, Double or String). |
static java.lang.Class |
classDouble
Class used to signify the values in a column are doubles, and implies the content of the array in the column's DataSeries is being maintained internally is a double[]. |
static java.lang.Class |
classDoubleArray
Class used to signify the values in the column's DataSeries are being maintained internally is a double[]. |
static java.lang.Class |
classIntArray
Class used to signify the values in the column's DataSeries are being maintained internally is an int[]. |
static java.lang.Class |
classInteger
Class used to signify the values in a column are ints, and implies the content of the array in the column's DataSeries is being maintained internally is an int[]. |
static java.lang.Class |
classString
Class used to signify the values in a column are Strings, and implies the content of the array in the column's DataSeries is being maintained internally is a String[]. |
static java.lang.Class |
classStringArray
Class used to signify the values in the column's DataSeries are being maintained internally is a String[]. |
static boolean |
DEFAULT_CALC_ON_ADD
Set to false, the default value for whether (true) or not (false) calculations should be performed each time a value is added to the history of this DataTable. |
static java.lang.String |
DEFAULT_DELIMITER_STRING
Set to " \t,", this is the String used to parse input records to find fields (titles or data values). |
static boolean |
DEFAULT_HAS_TITLES
Set to true, the default value for whether (true) or not (false) files are expected to contain the column titles (DataSeries names) as delimited fields their first record. |
static int |
DEFAULT_HISTORY_SIZE
Set to 10, this is the default number of rows allocated during construction unless a parameter is used to specify otherwise during construction. |
static int |
INVALID_INDEX
Equal to -1, this is used to signal an invalid index for operations expecting to return an index to information (typically uesd when none is available or when an error has occurred). |
static int |
MAX_RECORD_SIZE
Equal to 4096, this is used to limit the number of bytes read for a single "record" containing delimited data to be added to this DataTable. |
static java.lang.String |
strUnknown
Set to "Unknown", this is the default name used for an unnamed DataTable. |
Fields inherited from class com.ibm.able.AbleObject |
---|
changed, chgSupport, comment, dataFlowEnabled, defaultName, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
Constructor Summary | |
---|---|
AbleDataTable(double dColCount)
Constructor allowing objects to be constructed with the specified number of columns. |
|
AbleDataTable(double dColCount,
boolean bCalcOnAdd)
Constructor allowing objects to be constructed with the specified number of columns. |
|
AbleDataTable(int iColCount)
Constructor allowing objects to be constructed with the specified number of columns. |
|
AbleDataTable(int iColCount,
boolean bCalcOnAdd)
Constructor allowing objects to be constructed with the specified number of columns. |
|
AbleDataTable(java.lang.String strFileName)
Constructor allowing objects to be constructed with the content of the specified file. |
|
AbleDataTable(java.lang.String[] strRecordArray,
boolean bHasTitles,
boolean bCalcOnAdd)
Constructor allowing objects to be constructed with the content of the specified String[]. |
|
AbleDataTable(java.lang.String strFileName,
boolean bHasTitles,
boolean bCalcOnAdd)
Constructor allowing objects to be constructed with the content of the specified file. |
Method Summary | |
---|---|
boolean |
addRow(java.lang.Object[] rowData)
Method to add a row of data Objects contained in the supplied Object[]. |
boolean |
addRow(java.util.Vector rowData)
Method to add a row of data Objects contained in the supplied Vector. |
java.lang.Double |
append(AbleDataTable tableToAppend)
Append the contents of one DataTable to the front of this DataTable's history (e.g., as newer data). |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
boolean |
duplicateColumn(double dCol,
java.lang.String strNewTitle)
Method to duplicate one column, and create another in this DataTable. |
boolean |
duplicateColumn(int iCol,
java.lang.String strNewTitle)
Method to duplicate one column, and create another in this DataTable. |
boolean |
duplicateColumn(java.lang.String strColumnName,
java.lang.String strNewTitle)
Method to duplicate one column, and create another in this DataTable. |
java.util.Vector |
findRow(double dCol,
java.lang.Object value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRow(int iCol,
java.lang.Object value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRow(java.lang.String strColumnName,
java.lang.Double value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRow(java.lang.String strColumnName,
java.lang.Integer value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRow(java.lang.String strColumnName,
java.lang.Object value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRow(java.lang.String strColumnName,
java.lang.String value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRowInSortedColumn(double dCol,
java.lang.Object value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRowInSortedColumn(int iCol,
java.lang.Object value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
java.util.Vector |
findRowInSortedColumn(java.lang.String strColumnName,
java.lang.Object value)
Method to find the row containing the supplied value in the the supplied column, and return that row as a Vector. |
boolean |
getCalcOnAdd()
Returns the boolean value of the m_bCalcOnAdd flag. |
int |
getCapacity()
Return the potential row capacity for entries in this DataTable as an int. |
java.util.Vector |
getColumn(int iCol)
Method to return the content of a named column as a Vector of Java Objects corresponding with the columns data type. |
java.util.Vector |
getColumn(java.lang.String strColumnName)
Method to return the content of a named column as a Vector of Java Objects corresponding with the columns data type. |
double[] |
getColumnAsDoubleArray(int iCol)
Method to return the content of a named column as a double[]. |
double[] |
getColumnAsDoubleArray(java.lang.String strColumnName)
Method to return the content of a named column as a double[]. |
java.util.Vector |
getColumnAsDoubleVector(int iCol)
Method to return the content of a named column as a Vector of Doubles. |
java.util.Vector |
getColumnAsDoubleVector(java.lang.String strColumnName)
Method to return the content of a named column as a Vector of Doubles. |
int[] |
getColumnAsIntArray(int iCol)
Method to return the content of a named column as an int[]. |
int[] |
getColumnAsIntArray(java.lang.String strColumnName)
Method to return the content of a named column as an int[]. |
java.lang.String[] |
getColumnAsStringArray(int iCol)
Method to return the content of a named column as a String[]. |
java.lang.String[] |
getColumnAsStringArray(java.lang.String strColumnName)
Method to return the content of a named column as a String[]. |
double |
getColumnAverage(int iCol)
Returns the average of the values in the specified column. |
java.lang.Double |
getColumnAverage(java.lang.String strColumnName)
Returns the average of the values in the specified column. |
java.lang.Class |
getColumnClass(int iCol)
Return the Class describing the data stored in this column's DataSeries. |
java.lang.Class |
getColumnClass(java.lang.String strColumnName)
Return the Class describing the data stored in this column's DataSeries. |
int |
getColumnCount()
Method to return the number of columns in this DataTable. |
int |
getColumnIndex(java.lang.String strColumnName)
Method to return the column number (0-based index) for the named column. |
double |
getColumnMaximum(int iCol)
Returns the maximum of the values in the specified column. |
double |
getColumnMaximum(java.lang.String strColumnName)
Returns the maximum of the values in the specified column. |
double |
getColumnMinimum(int iCol)
Returns the minimum of the values in the specified column. |
double |
getColumnMinimum(java.lang.String strColumnName)
Returns the minimum of the values in the specified column. |
double |
getColumnStdDeviation(int iCol)
Returns the standard deviation of the values in the specified column. |
double |
getColumnStdDeviation(java.lang.String strColumnName)
Returns the standard deviation of the values in the specified column. |
double |
getColumnSum(int iCol)
Returns the sum of the values in the specified column. |
double |
getColumnSum(java.lang.String strColumnName)
Returns the sum of the values in the specified column. |
java.lang.String |
getColumnTitle(int iCol)
Method to return the specified column's name |
java.lang.String[] |
getColumnTitlesByColumn()
Method to return the titles of all this DataTable's columns in their numeric order (e.g., left (0) to right (m_iCols)). |
java.lang.String[] |
getColumnTitlesByName()
Method to return the titles of all this DataTable's columns in their name order (e.g., alphabetic sort order). |
double |
getColumnVariance(int iCol)
Returns the variance of the values in the specified column. |
double |
getColumnVariance(java.lang.String strColumnName)
Returns the variance of the values in the specified column. |
AbleDataSeries |
getDataSeries(int iCol)
Method to return the content of a named column as a DataSeries. |
AbleDataSeries |
getDataSeries(java.lang.String strColumnName)
Method to return the content of a named column as a DataSeries. |
AbleDataTable |
getDataTable(boolean bCalcOnAdd)
Method to create a new DataTable from the existing DataTable All aspects of this DataTable, including its name are retained in the new one with the exception of whether or not statistical calculations are to be performed when rows are added to the DataTable being returned. |
AbleDataTable |
getDataTable(int[] indexArray)
Method to create a new DataTable from the existing DataTable based on a subset of row indices. |
AbleDataTable |
getDataTable(int[] indexArray,
boolean bCalcOnAdd)
Method to create a new DataTable from the existing DataTable based on a subset of row indices. |
AbleDataTable |
getDataTable(int iCol,
java.lang.Object from,
java.lang.Object thru,
boolean bIsSorted)
Method to return a portion of this DataTable based on the selection criteria of the from and thru parameters for the specified column. |
AbleDataTable |
getDataTable(java.lang.Object indexArrayObj)
Method to create a new DataTable from the existing DataTable based on a subset of row indices passed in an object. |
AbleDataTable |
getDataTable(java.lang.String strColumnName,
java.lang.Double DFrom,
java.lang.Double DThru,
boolean bIsSorted)
Method to return a portion of this DataTable based on the selection criteria of the from and thru parameters for the specified column. |
AbleDataTable |
getDataTable(java.lang.String strColumnName,
java.lang.Object objFrom,
java.lang.Object objThru,
boolean bIsSorted)
Method to return a portion of this DataTable based on the selection criteria of the from and thru parameters for the specified column. |
AbleDataTable |
getDataTable(java.lang.String strColumnName,
java.lang.String strFrom,
java.lang.String strThru,
boolean bIsSorted)
Method to return a portion of this DataTable based on the selection criteria of the from and thru parameters for the specified column. |
static AbleDataTable |
getDataTableFromFile(java.lang.String strFileName)
Static utility method to create a new AbleDataTable with data values read from the specified file. |
static AbleDataTable |
getDataTableFromFile(java.lang.String strFileName,
java.lang.Boolean BHasTitles,
java.lang.Boolean BCalcOnAdd)
Static utility metho allowing a new AbleDataTable to be constructed with the content of the specified file. |
java.util.Vector |
getRow(int iRow)
Method to return the row specified by the supplied number. |
int |
getRowCount()
Method to return the number of rows in this DataTable. |
java.lang.Class[] |
getTypeClassesByColumn()
Method to return the Classes of all this DataTable's columns in their column numeric order (e.g., left (0) to right (m_iCols)). |
java.lang.String[] |
getTypesByColumn()
Method to return the types (names of Classes) of all this DataTable's columns in their column numeric order (e.g., left (0) to right (m_iCols)). |
boolean |
isLocked()
Method to return locked state of this object |
AbleDataTable |
loadFromFile(java.lang.String strFileName)
Utility method to create and fill a new DataTable with the contents of a specified file. |
AbleDataTable |
loadFromFile(java.lang.String strFileName,
boolean bHasTitles,
boolean bCalcOnAdd)
Utility method to create and fill a new DataTable with the contents of a specified file. |
AbleDataTable |
loadFromFile(java.lang.String strFileName,
java.lang.Boolean BHasTitles,
java.lang.Boolean BCalcOnAdd)
Utility method to create and fill a new DataTable with the contents of a specified file. |
void |
lock()
|
protected boolean |
replaceColArray(AbleDataSeries[] colArray)
Method to replace the current content of this DataTable with another set of columns. |
boolean |
saveToFile(java.lang.String strFileName,
java.lang.String strDelimiter)
Method to save the content of this DataTable to a delimited text file, including the column titles in the first record written. |
boolean |
saveToFile(java.lang.String strFileName,
java.lang.String strDelimiter,
boolean bOverwrite)
Method to save the content of this DataTable to a delimited text file, including the column titles in the first record written. |
void |
setCalcOnAdd(boolean bCalcOnAdd)
Allows one to control the value of the m_bCalcOnAdd flag describing whether (true) or not (false) statistical calculations are performed when values are added to the history maintained by this object. |
void |
setCapacity(int iCapacity)
Method to alter the size of the history maintained by this object. |
boolean |
setCell(int iRow,
int iCol,
java.lang.Object objInput)
Method to set the specified "cell" in this DataTable to the value in the object passed. |
boolean |
setColumn(int iCol,
AbleDataSeries colSeries)
Method to set the specified column's data values to those in the supplied DataSeries. |
boolean |
setColumn(int iCol,
java.lang.Object[] colData)
Method to set the specified column's data values to those in the supplied Object[]. |
boolean |
setColumn(int iCol,
java.util.Vector colData)
Method to set the specified column's data values to those in the supplied Vector. |
boolean |
setColumnSelectedToValue(int iCol,
int[] selectRows,
java.lang.Object colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnSelectedToValue(java.lang.String strColumnName,
int[] selectRows,
java.lang.Double colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnSelectedToValue(java.lang.String strColumnName,
int[] selectRows,
java.lang.Integer colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnSelectedToValue(java.lang.String strColumnName,
int[] selectRows,
java.lang.Object colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnSelectedToValue(java.lang.String strColumnName,
int[] selectRows,
java.lang.String colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnSelectedToValue(java.lang.String strColumnName,
java.lang.Object selectRows,
java.lang.Double colData)
Method to set the specified column's data values to the supplied value. |
void |
setColumnTitle(int iCol,
java.lang.String strTitle)
Method to set a specified columns title to the specified String |
void |
setColumnTitle(java.lang.String strColumnName,
java.lang.String strTitle)
Method to set a specified columns title to the specified String |
void |
setColumnTitles(java.lang.String[] titleList)
Method to revise the current titles for the DataTable's columns using the content of the passed String[]. |
void |
setColumnTitles(java.util.Vector titleList)
Method to revise the current titles for the DataTable's columns using the content of the passed Vector. |
boolean |
setColumnToValue(int iCol,
java.lang.Object colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnToValue(java.lang.String strColumnName,
java.lang.Double colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnToValue(java.lang.String strColumnName,
java.lang.Integer colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnToValue(java.lang.String strColumnName,
java.lang.Object colData)
Method to set the specified column's data values to the supplied value. |
boolean |
setColumnToValue(java.lang.String strColumnName,
java.lang.String colData)
Method to set the specified column's data values to the supplied value. |
void |
setLocked(boolean bLocked)
Method to set locked state of this object. |
boolean |
setRow(java.lang.Double DRow,
java.util.Vector rowData)
Method to update a rows contents with the data passed in the Vector. |
boolean |
setRow(int iRow,
java.lang.Object[] rowData)
Method to update a rows contents with the data passed in the Object[]. |
boolean |
setRow(int iRow,
java.util.Vector rowData)
Method to update a rows contents with the data passed in the Vector. |
boolean |
setTypeClasses(java.lang.Class[] classTypes)
Method to alter the column storage method (and potentially, their contents) to match the specified Class. |
void |
unlock()
Method to unlock this DataTable to allow history expansion when new values are added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.Class classClass
classDouble
,
classInteger
,
classString
public static final java.lang.Class classDouble
public static final java.lang.Class classDoubleArray
classDouble
public static final java.lang.Class classIntArray
classInteger
public static final java.lang.Class classInteger
public static final java.lang.Class classString
public static final java.lang.Class classStringArray
classString
public static final boolean DEFAULT_CALC_ON_ADD
getCalcOnAdd()
,
setCalcOnAdd(boolean)
public static final java.lang.String DEFAULT_DELIMITER_STRING
public static final boolean DEFAULT_HAS_TITLES
DEFAULT_DELIMITER_STRING
public static final int DEFAULT_HISTORY_SIZE
public static final int INVALID_INDEX
public static final int MAX_RECORD_SIZE
public static final java.lang.String strUnknown
AbleObject.setName(java.lang.String)
Constructor Detail |
public AbleDataTable(double dColCount)
dColCount
- The number of columns to be maintained by this
DataTable.DEFAULT_CALC_ON_ADD
public AbleDataTable(double dColCount, boolean bCalcOnAdd) throws java.rmi.RemoteException
dColCount
- The number of columns to be maintained by this
DataTable.bCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.public AbleDataTable(int iColCount)
iColCount
- The number of columns to be maintained by this
DataTable.DEFAULT_CALC_ON_ADD
public AbleDataTable(int iColCount, boolean bCalcOnAdd)
iColCount
- The number of columns to be maintained by this
DataTable.bCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.public AbleDataTable(java.lang.String strFileName)
strFileName
- the name of the file (may include path
information) that will be read to fill this DataTable.DEFAULT_CALC_ON_ADD
,
DEFAULT_HAS_TITLES
public AbleDataTable(java.lang.String strFileName, boolean bHasTitles, boolean bCalcOnAdd)
strFileName
- the name of the file (may include path
information) that will be read to fill this DataTable.bHasTitles
- specifies whether (true) or not (false) the
file being read contains column titles in its first row.bCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.public AbleDataTable(java.lang.String[] strRecordArray, boolean bHasTitles, boolean bCalcOnAdd)
strRecordArray
- the array or Strings containing records to
fill this DataTable.bHasTitles
- specifies whether (true) or not (false) the
file being read contains column titles in its first row.bCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.Method Detail |
public static java.lang.String Copyright()
public static AbleDataTable getDataTableFromFile(java.lang.String strFileName)
strFileName
- The String containing the file (and optionally the
path) from which data will be read to fill the content of a new
AbleDataTable.public static AbleDataTable getDataTableFromFile(java.lang.String strFileName, java.lang.Boolean BHasTitles, java.lang.Boolean BCalcOnAdd)
strFileName
- the name of the file (may include path
information) that will be read to fill this DataTable.BHasTitles
- specifies whether (true) or not (false) the
file being read contains column titles in its first row.BCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.public boolean addRow(java.lang.Object[] rowData)
rowData
- An Object[] containing the Objects to be added as a new
row in this DataTable. If this DataTable is locked, then the new
row will overwrite the oldest entry in the history. This method is
synchronized.public boolean addRow(java.util.Vector rowData)
rowData
- A Vector containing the Objects to be added as a new
row in this DataTable. If this DataTable is locked, then the new
row will overwrite the oldest entry in the history. This method uses
the synchronized addRow(Object[]) method.addRow(java.lang.Object[])
public java.lang.Double append(AbleDataTable tableToAppend)
tableToAppend
- is a DataTable whose contents will be appended
(added to) the front of the history maintained by this DataTable.
Note the DataTable much contain the same number and types of
columnar data (e.g., the column names much match, and the
method of storage within the columns must match).public boolean duplicateColumn(double dCol, java.lang.String strNewTitle)
dCol
- The column number (0-based index) to be updated.strNewTitle
- The name of the column to be updated.public boolean duplicateColumn(int iCol, java.lang.String strNewTitle)
iCol
- The column number (0-based index) to be updated.strNewTitle
- The name of the column to be updated.public boolean duplicateColumn(java.lang.String strColumnName, java.lang.String strNewTitle)
strColumnName
- The name of the column to be updated.strNewTitle
- The name of the column to be updated.public java.util.Vector findRow(double dCol, java.lang.Object value)
dCol
- The column number (0-based index) to be searched
for the matching value to what was passed.value
- An Object used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRow(int iCol, java.lang.Object value)
iCol
- The column number (0-based index) to be searched
for the matching value to what was passed.value
- An Object used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRow(java.lang.String strColumnName, java.lang.Double value)
strColumnName
- The name of the column to be searched
for the matching value to what was passed.value
- A Double used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRow(java.lang.String strColumnName, java.lang.Integer value)
strColumnName
- The name of the column to be searched
for the matching value to what was passed.value
- An Integer used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRow(java.lang.String strColumnName, java.lang.Object value)
strColumnName
- The name of the column to be searched
for the matching value to what was passed.value
- An Object used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRow(java.lang.String strColumnName, java.lang.String value)
strColumnName
- The name of the column to be searched
for the matching value to what was passed.value
- A String used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRowInSortedColumn(double dCol, java.lang.Object value)
dCol
- The column number (0-based index) to be searched
for the matching value to what was passed.value
- An Object used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRowInSortedColumn(int iCol, java.lang.Object value)
iCol
- The column number (0-based index) to be searched
for the matching value to what was passed.value
- An Object used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public java.util.Vector findRowInSortedColumn(java.lang.String strColumnName, java.lang.Object value)
strColumnName
- The name of the column to be searched
for the matching value to what was passed.value
- An Object used to compare against the content
of the specified column. If matched, the content of its
row in this DataTable is returned as a Vector.public boolean getCalcOnAdd()
public int getCapacity()
public java.util.Vector getColumn(int iCol)
iCol
- The column number (0-based index) whose contents are
to be retrieved.public java.util.Vector getColumn(java.lang.String strColumnName)
strColumnName
- The name of the column whose contents are
to be retrieved.public double[] getColumnAsDoubleArray(int iCol)
iCol
- The name column number (0-based index) whose
contents are to be retrieved.public double[] getColumnAsDoubleArray(java.lang.String strColumnName)
strColumnName
- The name of the column whose
contents are to be retrieved.public java.util.Vector getColumnAsDoubleVector(int iCol)
iCol
- The column number (0-based index) whose
contents are to be retrieved.public java.util.Vector getColumnAsDoubleVector(java.lang.String strColumnName)
strColumnName
- The name of the column whose
contents are to be retrieved.public int[] getColumnAsIntArray(int iCol)
iCol
- The column number (0-based index) whose
contents are to be retrieved.public int[] getColumnAsIntArray(java.lang.String strColumnName)
strColumnName
- The name of the column whose
contents are to be retrieved.public java.lang.String[] getColumnAsStringArray(int iCol)
iCol
- The column number (0-based index) whose
contents are to be retrieved.public java.lang.String[] getColumnAsStringArray(java.lang.String strColumnName)
strColumnName
- The name of the column whose
contents are to be retrieved.public double getColumnAverage(int iCol)
iCol
- The column number (0-based index) whose average is to
be returned.public java.lang.Double getColumnAverage(java.lang.String strColumnName)
strColumnName
- The name of the column whose average is to
be returned.public java.lang.Class getColumnClass(int iCol)
iCol
- is the number (0-based index) of the column whose
class you wish to know.classInteger
,
classDouble
,
classString
public java.lang.Class getColumnClass(java.lang.String strColumnName)
strColumnName
- is the name of the column whose class you
wish to know.classInteger
,
classDouble
,
classString
public int getColumnCount()
public int getColumnIndex(java.lang.String strColumnName)
strColumnName
- The name of the column whose index is to
be returned.public double getColumnMaximum(int iCol)
iCol
- The column number (0-based index) whose maximum is to
be returned.public double getColumnMaximum(java.lang.String strColumnName)
strColumnName
- The name of the column whose maximum is to
be returned.public double getColumnMinimum(int iCol)
iCol
- The column number (0-based index) whose minimum is to
be returned.public double getColumnMinimum(java.lang.String strColumnName)
strColumnName
- The name of the column whose minimum is to
be returned.public double getColumnStdDeviation(int iCol)
iCol
- The column number (0-based index) whose standard deviation is to
be returned.public double getColumnStdDeviation(java.lang.String strColumnName)
strColumnName
- The name of the column whose standard deviation is to
be returned.public double getColumnSum(int iCol)
iCol
- The column number (0-based index) whose sum is to
be returned.public double getColumnSum(java.lang.String strColumnName)
strColumnName
- The name of the column whose sum is to
be returned.public java.lang.String getColumnTitle(int iCol)
iCol
- The column number (0-based index) whose title should
be returned.strUnknown
public java.lang.String[] getColumnTitlesByColumn()
public java.lang.String[] getColumnTitlesByName()
public double getColumnVariance(int iCol)
iCol
- The column number (0-based index) whose variance is to
be returned.public double getColumnVariance(java.lang.String strColumnName)
strColumnName
- The name of the column whose variance is to
be returned.public AbleDataSeries getDataSeries(int iCol)
iCol
- The column number (0-based index) whose contents are
to be retrieved.public AbleDataSeries getDataSeries(java.lang.String strColumnName)
strColumnName
- The name of the column whose contents are
to be retrieved.public AbleDataTable getDataTable(boolean bCalcOnAdd) throws java.rmi.RemoteException
bCalcOnAdd
- allows the caller to specify if statistical
calculations are to be performed when new rows are added to the
DataTable being returned.public AbleDataTable getDataTable(int iCol, java.lang.Object from, java.lang.Object thru, boolean bIsSorted) throws java.rmi.RemoteException
iCol
- The column number (0-based index) to be searched
for conforming values between the from and thru values passed.from
- An Object defining the lower bound for comparisonthru
- An Object defining the upper bound for comparisonbIsSorted
- A value defining whether (true) or not (false)
the column being searched is sorted. If sorted, a binary
search is used. Otherwise, a brute force scan of the entire
column is used to find conforming values.public AbleDataTable getDataTable(int[] indexArray) throws java.rmi.RemoteException
iIndices
- is an array of row indices (int[]) to be copied from
this DataTable into the one being returned.public AbleDataTable getDataTable(int[] indexArray, boolean bCalcOnAdd) throws java.rmi.RemoteException
iIndices
- is an array of row indices (int[]) to be copied from
this DataTable into the one being returned.BCalcOnAdd
- allows the caller to specify if statistical
calculations are to be performed when new rows are added to the
DataTable being returned.public AbleDataTable getDataTable(java.lang.Object indexArrayObj) throws java.rmi.RemoteException
iIndices
- is an array of row indices (int[]) stored in an Object
to be copied from this DataTable into the one being returned.public AbleDataTable getDataTable(java.lang.String strColumnName, java.lang.Double DFrom, java.lang.Double DThru, boolean bIsSorted) throws java.rmi.RemoteException
strColumnName
- The name of the column to be searched
for conforming values between the from and thru values passed.DFrom
- A Double defining the lower bound for comparisonDThru
- A Double defining the upper bound for comparisonbIsSorted
- A value defining whether (true) or not (false)
the column being searched is sorted. If sorted, a binary
search is used. Otherwise, a brute force scan of the entire
column is used to find conforming values.public AbleDataTable getDataTable(java.lang.String strColumnName, java.lang.Object objFrom, java.lang.Object objThru, boolean bIsSorted) throws java.rmi.RemoteException
strColumnName
- The name of the column to be searched
for conforming values between the from and thru values passed.objFrom
- An Object defining the lower bound for comparisonobjThru
- An Object defining the upper bound for comparisonbIsSorted
- A value defining whether (true) or not (false)
the column being searched is sorted. If sorted, a binary
search is used. Otherwise, a brute force scan of the entire
column is used to find conforming values.public AbleDataTable getDataTable(java.lang.String strColumnName, java.lang.String strFrom, java.lang.String strThru, boolean bIsSorted) throws java.rmi.RemoteException
strColumnName
- The name of the column to be searched
for conforming values between the from and thru values passed.strFrom
- A String defining the lower bound for comparisonstrThru
- A String defining the upper bound for comparisonbIsSorted
- A value defining whether (true) or not (false)
the column being searched is sorted. If sorted, a binary
search is used. Otherwise, a brute force scan of the entire
column is used to find conforming values.public java.util.Vector getRow(int iRow)
iRow
- The row number (0-based index) whose contents
are to be returned as a Vector.public int getRowCount()
public java.lang.Class[] getTypeClassesByColumn()
classDouble
,
classInteger
,
classString
public java.lang.String[] getTypesByColumn()
classDouble
,
classInteger
,
classString
public boolean isLocked()
lock()
,
setLocked(boolean)
public AbleDataTable loadFromFile(java.lang.String strFileName)
strFileName
- the name of the file (may include path
information) that will be read to fill this DataTable.public AbleDataTable loadFromFile(java.lang.String strFileName, boolean bHasTitles, boolean bCalcOnAdd)
strFileName
- the name of the file (may include path
information) that will be read to fill this DataTable.bHasTitles
- specifies whether (true) or not (false) the
file being read contains column titles in its first row.bCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.public AbleDataTable loadFromFile(java.lang.String strFileName, java.lang.Boolean BHasTitles, java.lang.Boolean BCalcOnAdd)
strFileName
- the name of the file (may include path
information) that will be read to fill this DataTable.BHasTitles
- specifies whether (true) or not (false) the
file being read contains column titles in its first row.BCalcOnAdd
- specifies whether (true) or not (false) statistical
calculations should be performed when rows are added to this DataTable.public void lock()
protected boolean replaceColArray(AbleDataSeries[] colArray)
colArray
- An array of AbleDataSeries that will be used to
replace the content of this DataTable.public boolean saveToFile(java.lang.String strFileName, java.lang.String strDelimiter)
strFileName
- The String containing the name (and optionally
the path) of the file to receive the content of this DataTable.strDelimiter
- The String containing the character(s) to be
used to delimit the fields in the records written to the output
file.public boolean saveToFile(java.lang.String strFileName, java.lang.String strDelimiter, boolean bOverwrite)
strFileName
- The String containing the name (and optionally
the path) of the file to receive the content of this DataTable.strDelimiter
- The String containing the character(s) to be
used to delimit the fields in the records written to the output
file.bOverwrite
- A boolean to determine whether (true) or not (false)
the file specified should be overwritten if it exists. If false is
specified and the file exists, nothing happens and the method returns
false.public void setCalcOnAdd(boolean bCalcOnAdd)
bCalcOnAdd
- defines whether (true) or not (false) statistical
calculations are performed when values are added to the history
maintained by this object.public void setCapacity(int iCapacity)
iCapacity
- The desired size of the history maintained by this object.public boolean setCell(int iRow, int iCol, java.lang.Object objInput)
iRow
- The row number (0-based index) for the "cell" to be
changed.iCol
- The column number (0-based index) for the "cell" to be
changed.objInput
- The Object containing the value to be placed in the
"cell" specified at the address (iCol, iRow) in this DataTable.public boolean setColumn(int iCol, AbleDataSeries colSeries)
iCol
- The column number (0-based index) to be updated.colSeries
- A DataSeries containing the Objects to be used
to update the current content of the specified column's
history.public boolean setColumn(int iCol, java.lang.Object[] colData)
iCol
- The column number (0-based index) to be updated.colData
- An Object[] containing the Objects to be used
to update the current content of the specified column's
history. This method is synchronized.public boolean setColumn(int iCol, java.util.Vector colData)
iCol
- The column number (0-based index) to be updated.colData
- A Vector containing the Objects to be used
to update the current content of the specified column's
history.public boolean setColumnSelectedToValue(int iCol, int[] selectRows, java.lang.Object colData)
iCol
- The column number (0-based index) to be updated.selectRows
- The int[] containing the indices of the
rows to be updated with the supplied value.colData
- An Object containing the value to be used
to initialize all the values of this column.public boolean setColumnSelectedToValue(java.lang.String strColumnName, java.lang.Object selectRows, java.lang.Double colData)
strColumnName
- The name of the column to be updated.selectRows
- An Object holding an int[] containing the indices
of the rows to be updated with the supplied value.colData
- A Double containing the value to be used
to initialize all the values of this column.public boolean setColumnSelectedToValue(java.lang.String strColumnName, int[] selectRows, java.lang.Double colData)
strColumnName
- The name of the column to be updated.selectRows
- The int[] containing the indices of the
rows to be updated with the supplied value.colData
- A Double containing the value to be used
to initialize all the values of this column.public boolean setColumnSelectedToValue(java.lang.String strColumnName, int[] selectRows, java.lang.Integer colData)
strColumnName
- The name of the column to be updated.selectRows
- The int[] containing the indices of the
rows to be updated with the supplied value.colData
- An Integer containing the value to be used
to initialize all the values of this column.public boolean setColumnSelectedToValue(java.lang.String strColumnName, int[] selectRows, java.lang.Object colData)
strColumnName
- The name of the column to be updated.selectRows
- The int[] containing the indices of the
rows to be updated with the supplied value.colData
- An Object containing the value to be used
to initialize all the values of this column.public boolean setColumnSelectedToValue(java.lang.String strColumnName, int[] selectRows, java.lang.String colData)
strColumnName
- The name of the column to be updated.selectRows
- The int[] containing the indices of the
rows to be updated with the supplied value.colData
- A String containing the value to be used
to initialize all the values of this column.public void setColumnTitle(int iCol, java.lang.String strTitle)
iCol
- The column number (0-based index) whose name should
be changed to the passed String. This method is synchronized as
it updates both the underlying DataSeries and the Hashtable.strTitle
- The new name for the specified column.public void setColumnTitle(java.lang.String strColumnName, java.lang.String strTitle)
strColumnName
- The name of the column whose name should
be changed to the passed String. This method is synchronized as
it updates both the underlying DataSeries and the Hashtable.strTitle
- The new name for the specified column.public void setColumnTitles(java.lang.String[] titleList)
titleList
- The String[] containing the new Strings to be used
as column heading in this DataTable.public void setColumnTitles(java.util.Vector titleList)
titleList
- The Vector containing the new Strings to be used
as column heading in this DataTable.public boolean setColumnToValue(int iCol, java.lang.Object colData)
iCol
- The column number (0-based index) to be updated.colData
- A Double containing the value to be used
to initialize all the values of this column.public boolean setColumnToValue(java.lang.String strColumnName, java.lang.Double colData)
strColumnName
- The name of the column to be updated.colData
- A Double containing the value to be used
to initialize all the values of this column.public boolean setColumnToValue(java.lang.String strColumnName, java.lang.Integer colData)
strColumnName
- The name of the column to be updated.colData
- An Integer containing the value to be used
to initialize all the values of this column.public boolean setColumnToValue(java.lang.String strColumnName, java.lang.Object colData)
strColumnName
- The name of the column to be updated.colData
- An Object containing the value to be used
to initialize all the values of this column.public boolean setColumnToValue(java.lang.String strColumnName, java.lang.String colData)
strColumnName
- The name of the column to be updated.colData
- A String containing the value to be used
to initialize all the values of this column.public void setLocked(boolean bLocked)
bLocked
- boolean describing the desired lock state for
history. When locked, this object will wrap and overwrite
values in its history, rather than growing larger to accommodate
new entries.public boolean setRow(java.lang.Double DRow, java.util.Vector rowData)
DRow
- is the row number (0-based index) to be updated.rowData
- is the Vector containing the Objects
corresponding to the values to be set in each of the
row's columns.public boolean setRow(int iRow, java.util.Vector rowData)
iRow
- is the row number (0-based index) to be updated.rowData
- is the Vector containing the Objects
corresponding to the values to be set in each of the
row's columns.public boolean setRow(int iRow, java.lang.Object[] rowData)
iRow
- is the row number (0-based index) to be updated.rowData
- is the Object[] containing the Objects
corresponding to the values to be set in each of the
row's columns.public boolean setTypeClasses(java.lang.Class[] classTypes)
classTypes
- An array of Classes comprising classInteger,
classDouble, or classString used to determine the resulting
storage strategy to be used for each corresponding column.classDouble
,
classInteger
,
classString
public void unlock()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |