javax.management.openmbean
Class TabularType

java.lang.Object
  extended byjavax.management.openmbean.OpenType (src) 
      extended byjavax.management.openmbean.TabularType
All Implemented Interfaces:
java.io.Serializable

public class TabularType
extends OpenType (src)
implements java.io.Serializable

The TabularType is an OpenType that describes TabularData.

See Also:
TabularData (src) , Serialized Form

Field Summary
 
Fields inherited from class javax.management.openmbean.OpenType (src)
ALLOWED_CLASSNAMES
 
Constructor Summary
TabularType(java.lang.String typeName, java.lang.String description, CompositeType (src)  rowType, java.lang.String[] indexNames)
          Construct a tabular type.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Tests for equality with another composite type
 java.util.List getIndexNames()
          Retrieve an unmodifiable list of index names in the same order as passed to the constructor.
 CompositeType (src) getRowType()
          Retrieve the row type
 int hashCode()
          Retrieve the hashCode for this OpenType
 boolean isValue(java.lang.Object obj)
          Determines whether the object is a value of the this tabular type.
 java.lang.String toString()
          Retrieve a string representation of this open type
 
Methods inherited from class javax.management.openmbean.OpenType (src)
getClassName, getDescription, getTypeName, isArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabularType

public TabularType(java.lang.String typeName,
                   java.lang.String description,
                   CompositeType (src)  rowType,
                   java.lang.String[] indexNames)
            throws OpenDataException (src) 
Construct a tabular type. The parameters are checked for validity.

getClassName() returns javax.management.openbean.TabularData

Parameters:
typeName - the name of the tabular type, cannot be null or empty
description - the human readable description of the tabular type, cannot be null or empty
rowType - the type of the row elements in the tabular data, cannot be null
indexNames - the names of the item values that uniquely index each row element in the tabular data, cannot be null or empty. Each element must be an item name in the rowType, nul or empty is not allowed. The order of the item names in this parameter is used by TabularData.get(java.lang.Object[]) and TabularData.remove(java.lang.Object[]) the TabularData to match the array of values to items.
Throws:
OpenDataException (src) - when an element of indexNames is not defined in rowType.
java.lang.IllegalArgumentException - when a parameter does not match what is described above.
Method Detail

getRowType

public CompositeType (src)  getRowType()
Retrieve the row type

Returns:
the row type

getIndexNames

public java.util.List getIndexNames()
Retrieve an unmodifiable list of index names in the same order as passed to the constructor.

Returns:
the index names

isValue

public boolean isValue(java.lang.Object obj)
Determines whether the object is a value of the this tabular type.

The object must not be null and it must be an instance of javax.management.openbean.TabularData. The TabularType of the TabularData have equality with this TabularType.

Specified by:
isValue in class OpenType (src)
Parameters:
obj - the object to test
Returns:
the true when the above condition is satisfied, false otherwise

equals

public boolean equals(java.lang.Object obj)
Tests for equality with another composite type

The type names must be equal.
The row types are equal
The index names are the same and in the same order.

Specified by:
equals in class OpenType (src)
Parameters:
obj - the other tabular type to test
Returns:
the true when the above condition is satisfied, false otherwise

hashCode

public int hashCode()
Description copied from class: OpenType (src)
Retrieve the hashCode for this OpenType

Specified by:
hashCode in class OpenType (src)
Returns:
the hash code

toString

public java.lang.String toString()
Description copied from class: OpenType (src)
Retrieve a string representation of this open type

Specified by:
toString in class OpenType (src)
Returns:
the string representation