javax.jmx.openmbean
Class TabularData

java.lang.Object
  |
  +--javax.jmx.openmbean.TabularData
Direct Known Subclasses:
ExtendedTabularData

public class TabularData
extends java.lang.Object
implements java.io.Serializable

The TabularData defines a table structure with an arbitrary number of rows which can be indexed by any number of columns.Each row is a CompositeData instance , but all rows must have the same composite data description. The columns of the table are headed by the names of the data items which make up the uniform CompositeData rows. The index consists of a subset of the data items in the common composite data structure, with the requirement that this subset must be a key which uniquely identifies each row of the table.

See Also:
Serialized Form

Constructor Summary
TabularData(TabularParameterInfo parameterInfo, CompositeData[] rows)
          Constructs a TabularData with the TabularParameterInfo and the array of CompositeData objects.This verifies that all rows are uniform and that they can be uniquely indexed by the data items named in the given TabularParameterInfo
 
Method Summary
 void addRow(java.lang.Object[] index, CompositeData comp)
          Adds the compositeData
 boolean containsRow(java.lang.Object[] index)
          Checks whether or not there is a row which matches the key (ie., the index array) exists in this TabularData.
 CompositeData deleteRow(java.lang.Object[] index)
          Deletes the compositeData
 java.util.Enumeration enumerate()
          Returns the Enumeration of all the CompositeData instances in this table.
 CompositeData getRow(java.lang.Object[] index)
          Returns the CompositeData which makes up the designated row indexed by the index array.The order and type of the objects must match those of the data items which make up the index columns in the table description
 TabularParameterInfo getTabularParameterInfo()
          Returns the corresponding TabularParamterInfo for this table.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabularData

public TabularData(TabularParameterInfo parameterInfo,
                   CompositeData[] rows)
            throws java.lang.Exception
Constructs a TabularData with the TabularParameterInfo and the array of CompositeData objects.This verifies that all rows are uniform and that they can be uniquely indexed by the data items named in the given TabularParameterInfo
Parameters:
parameterInfo - is a descriptor which provides the list of index names and the description of the data items in the common composite data structure.
rows - contains the values of the table,each instance describes a row of the table.
Method Detail

getRow

public CompositeData getRow(java.lang.Object[] index)
Returns the CompositeData which makes up the designated row indexed by the index array.The order and type of the objects must match those of the data items which make up the index columns in the table description
Parameters:
index - the array of objects which index one row.
Returns:
CompositeData - the designated row indexed by the index [].

containsRow

public boolean containsRow(java.lang.Object[] index)
Checks whether or not there is a row which matches the key (ie., the index array) exists in this TabularData.
Parameters:
index - the arrray of objects which index one row.
Returns:
boolean true if row exists for the corresponding index

enumerate

public java.util.Enumeration enumerate()
Returns the Enumeration of all the CompositeData instances in this table.
Returns:
Enumeration of the CompositeData instances in this table.

getTabularParameterInfo

public TabularParameterInfo getTabularParameterInfo()
Returns the corresponding TabularParamterInfo for this table.
Returns:
TabularParamterInfo parameter.

deleteRow

public CompositeData deleteRow(java.lang.Object[] index)
Deletes the compositeData

addRow

public void addRow(java.lang.Object[] index,
                   CompositeData comp)
Adds the compositeData