|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hp.ucmdb.discovery.library.clients.agents.DynamicParserTable
public class DynamicParserTable
DynamicParserTable
provides services to handle data tables.
Field Summary | |
---|---|
static int |
COLUMNS_UNSPECIFIED
|
Constructor Summary | |
---|---|
DynamicParserTable()
|
|
DynamicParserTable(Element table)
Creates a table from the information in the XML. |
|
DynamicParserTable(java.lang.String name)
Creates a table with the specifed name. |
|
DynamicParserTable(java.lang.String name,
int columns)
Creates a table with the specifed name and number of columns. |
|
DynamicParserTable(java.lang.String name,
int columns,
int rows)
Creates a table with the specifed name, number of columns, and number of rows. |
|
DynamicParserTable(java.lang.String name,
java.lang.String[][] data)
Creates a table from the information in the string array. |
Method Summary | |
---|---|
void |
addData(java.util.ArrayList<java.lang.Object> data)
|
int |
appendRow()
|
java.lang.Boolean |
getBoolean(int index)
Returns true if the contents of the specifed cell are the word "true" or if the contents are a boolean true. |
java.lang.Object |
getCell(int row,
int col)
|
int |
getColumnCount()
|
java.lang.Double |
getDouble(int index)
Returns the Double value of the specified cell. |
java.lang.Float |
getFloat(int index)
Returns the Float value of the specified cell. |
int |
getIndex()
|
java.lang.Integer |
getInt(int index)
Returns the Integer value of the specified cell. |
java.lang.String |
getlabel()
|
java.lang.Long |
getLong(int index)
Returns the Long value of the specified cell. |
int |
getRowCount()
|
java.lang.String |
getString(int index)
Returns the String representation of the data in the specified cell in the current row. |
java.util.ArrayList |
getTableData()
|
java.lang.String |
getTableName()
|
boolean |
incIndex()
Points the index to the next row. |
void |
removeAllRows()
|
boolean |
resetIndex()
Sets the index to point to the first row. |
void |
setCell(int row,
int col,
java.lang.Object newValue)
|
void |
setdata(java.util.ArrayList<java.util.ArrayList<java.lang.Object>> data)
|
void |
setIndex(int index)
|
java.lang.String |
toString()
Returns a String containing the data from all cells. |
java.lang.String |
toXml()
Returns an XML String containing the data from all cells. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int COLUMNS_UNSPECIFIED
Constructor Detail |
---|
public DynamicParserTable()
public DynamicParserTable(java.lang.String name)
name
- The name of the tablepublic DynamicParserTable(java.lang.String name, int columns)
name
- The name of the tablecolumns
- The number of columnspublic DynamicParserTable(java.lang.String name, int columns, int rows)
name
- The name of the tablecolumns
- The number of columnsrows
- The number of rowspublic DynamicParserTable(Element table)
table
- The xml elementpublic DynamicParserTable(java.lang.String name, java.lang.String[][] data)
name
- the table namedata
- The table dataMethod Detail |
---|
public int appendRow()
public int getRowCount()
public int getColumnCount()
public java.lang.Object getCell(int row, int col)
public void setCell(int row, int col, java.lang.Object newValue)
public java.lang.String getTableName()
public int getIndex()
public java.lang.String getlabel()
public java.util.ArrayList getTableData()
public void setIndex(int index)
public void setdata(java.util.ArrayList<java.util.ArrayList<java.lang.Object>> data)
public void addData(java.util.ArrayList<java.lang.Object> data)
public void removeAllRows()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toXml()
public boolean incIndex()
public boolean resetIndex()
public java.lang.String getString(int index) throws java.lang.Exception
index
- the column number
java.lang.Exception
public java.lang.Boolean getBoolean(int index) throws java.lang.Exception
getBoolean
is not case-sensitive for the string "true".
java.lang.Exception
public java.lang.Integer getInt(int index) throws java.lang.Exception
java.lang.Exception
- if the cell contents cannot be interpreted as an Integer.public java.lang.Long getLong(int index) throws java.lang.Exception
java.lang.Exception
- if the cell contents cannot be interpreted as a Long.public java.lang.Float getFloat(int index) throws java.lang.Exception
java.lang.Exception
- if the cell contents cannot be interpreted as a Float.public java.lang.Double getDouble(int index) throws java.lang.Exception
java.lang.Exception
- if the cell contents cannot be interpreted as a Double.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |