javax.management.openmbean
Class TabularType

java.lang.Object
  extended byjavax.management.openmbean.OpenType
      extended byjavax.management.openmbean.TabularType
All Implemented Interfaces:
Serializable

public class TabularType
extends OpenType

The TabularType is an OpenType that describes TabularData.

Version:
$Revision: 1.1.2.3 $
Author:
Adrian Brock.
See Also:
TabularData, Serialized Form

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

Constructor Detail

TabularType

public TabularType(String typeName,
                   String description,
                   CompositeType rowType,
                   String[] indexNames)
            throws OpenDataException
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 - when an element of indexNames is not defined in rowType.
IllegalArgumentException - when a parameter does not match what is described above.
Method Detail

getRowType

public CompositeType getRowType()
Retrieve the row type

Returns:
the row type

getIndexNames

public 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(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
Parameters:
obj - the object to test
Returns:
the true when the above condition is satisfied, false otherwise

equals

public boolean equals(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
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
Retrieve the hashCode for this OpenType

Specified by:
hashCode in class OpenType
Returns:
the hash code

toString

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

Specified by:
toString in class OpenType
Returns:
the string representation


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.