javax.management.openmbean
Class TabularType

java.lang.Object
  |
  +--javax.management.openmbean.OpenType
        |
        +--javax.management.openmbean.TabularType
All Implemented Interfaces:
java.io.Serializable

public class TabularType
extends OpenType
implements java.io.Serializable

Version:
$Revision: 1.10 $
Author:
Bronwen Cassidy
See Also:
Serialized Form

Fields inherited from class javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES
 
Constructor Summary
TabularType(java.lang.String typeName, java.lang.String description, CompositeType rowType, java.lang.String[] indexNames)
          Constructs a TabularType instance Parameters: typeName - the name given to this tabularType instance, cannot be null or empty description - the human readable description of the tabularType this instance refers to cannot be null or empty rowType - the type of the row elements of tabular data values described by this tabular type instance cannot be null indexNames - the names of the items which are used to uniquely index each row element in the tabular data values, cannot be null or empty
- each element should be an item name defined in rowType.
 
Method Summary
 boolean equals(java.lang.Object object)
          determines if the object passed in is equal to this class instance
 java.util.List getIndexNames()
           
 CompositeType getRowType()
           
 int hashCode()
          computes a hashcode for this instance
 boolean isValue(java.lang.Object object)
          checks if the typeName of the object is the same as the typeName of this TabularType instance
 java.lang.String toString()
          creates a user friendly string value of the class
 
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(java.lang.String typeName,
                   java.lang.String description,
                   CompositeType rowType,
                   java.lang.String[] indexNames)
            throws OpenDataException
Constructs a TabularType instance

Parameters:

typeName - the name given to this tabularType instance, cannot be null or empty

description - the human readable description of the tabularType this instance refers to cannot be null or empty

rowType - the type of the row elements of tabular data values described by this tabular type instance cannot be null

indexNames - the names of the items which are used to uniquely index each row element in the tabular data values, cannot be null or empty
- each element should be an item name defined in rowType. - NOTE: The order of the itemNames is used by the methods get and remove of class TabularData to match their array of values to items

Throws:

IllegalArgumentException - if rowType is null, indexNames or any item in indexNames are null or empty, typeName or description are null

OpenDataException - if an element of indexNames is not an item defined in RowType

Method Detail

getRowType

public CompositeType getRowType()
Returns:
CompositeType - the type of the row elements of tabular data values described by this TabularType instance

getIndexNames

public java.util.List getIndexNames()
Returns:
- Returns, in the same order as was given to this instance's constructor, an unmodifiable List of the names of the items the values of which are used to uniquely index each row element of tabular data values described by this TabularType instance

isValue

public boolean isValue(java.lang.Object object)
checks if the typeName of the object is the same as the typeName of this TabularType instance
Overrides:
isValue in class OpenType
Parameters:
object - - the tabularType instance to check if the typeName is a value of this instance
Returns:
true if the objects typeName is the same as that of this instance, false if either the object is not an instance of this class or the typeNames do not match

equals

public boolean equals(java.lang.Object object)
determines if the object passed in is equal to this class instance
Overrides:
equals in class OpenType
Parameters:
object - the object to test if equal to this class
Returns:
true if the object is equal to this class, false if the object is not an instance of this class or if the data contained in the object is not the same as the data contained in this class instance

hashCode

public int hashCode()
computes a hashcode for this instance
Overrides:
hashCode in class OpenType
Returns:
the int value of the hashcode. As TabularTypeBackUP instances are immutable, the hash code for this instance is calculated once, on the first call to hashCode, and then the same value is returned for subsequent calls

toString

public java.lang.String toString()
creates a user friendly string value of the class
Overrides:
toString in class OpenType
Returns:
the string representation of the class As TabularTypeBackUP instances are immutable, the string representation for this instance is calculated once, on the first call to toString, and then the same value is returned for subsequent calls ie. we use lazy initialization


Copyright © 2001-2002 MX4J Team. All Rights Reserved.