javax.management.openmbean
Class TabularType

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.openmbean.OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType 
      extended by javax.management.openmbean.TabularType
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class TabularType
extends OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

The TabularType class is the open type class whose instances describe the types of TabularData sample code for javax.management.openmbean.TabularData definition code for javax.management.openmbean.TabularData values.

Since:
1.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.management.openmbean.OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES sample code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES definition code for javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES
 
Constructor Summary
TabularType sample code for javax.management.openmbean.TabularType.TabularType(java.lang.String, java.lang.String, javax.management.openmbean.CompositeType, java.lang.String[]) definition code for javax.management.openmbean.TabularType.TabularType(java.lang.String, java.lang.String, javax.management.openmbean.CompositeType, java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  typeName, String sample code for java.lang.String definition code for java.lang.String  description, CompositeType sample code for javax.management.openmbean.CompositeType definition code for javax.management.openmbean.CompositeType  rowType, String sample code for java.lang.String definition code for java.lang.String [] indexNames)
          Constructs a TabularType instance, checking for the validity of the given parameters.
 
Method Summary
 boolean equals sample code for javax.management.openmbean.TabularType.equals(java.lang.Object) definition code for javax.management.openmbean.TabularType.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares the specified obj parameter with this TabularType instance for equality.
 List sample code for java.util.List definition code for java.util.List getIndexNames sample code for javax.management.openmbean.TabularType.getIndexNames() definition code for javax.management.openmbean.TabularType.getIndexNames() ()
          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.
 CompositeType sample code for javax.management.openmbean.CompositeType definition code for javax.management.openmbean.CompositeType getRowType sample code for javax.management.openmbean.TabularType.getRowType() definition code for javax.management.openmbean.TabularType.getRowType() ()
          Returns the type of the row elements of tabular data values described by this TabularType instance.
 int hashCode sample code for javax.management.openmbean.TabularType.hashCode() definition code for javax.management.openmbean.TabularType.hashCode() ()
          Returns the hash code value for this TabularType instance.
 boolean isValue sample code for javax.management.openmbean.TabularType.isValue(java.lang.Object) definition code for javax.management.openmbean.TabularType.isValue(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Tests whether obj is a value which could be described by this TabularType instance.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.openmbean.TabularType.toString() definition code for javax.management.openmbean.TabularType.toString() ()
          Returns a string representation of this TabularType instance.
 
Methods inherited from class javax.management.openmbean.OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() , getDescription sample code for javax.management.openmbean.OpenType.getDescription() definition code for javax.management.openmbean.OpenType.getDescription() , getTypeName sample code for javax.management.openmbean.OpenType.getTypeName() definition code for javax.management.openmbean.OpenType.getTypeName() , isArray sample code for javax.management.openmbean.OpenType.isArray() definition code for javax.management.openmbean.OpenType.isArray()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

TabularType sample code for javax.management.openmbean.TabularType(java.lang.String, java.lang.String, javax.management.openmbean.CompositeType, java.lang.String[]) definition code for javax.management.openmbean.TabularType(java.lang.String, java.lang.String, javax.management.openmbean.CompositeType, java.lang.String[])

public TabularType(String sample code for java.lang.String definition code for java.lang.String  typeName,
                   String sample code for java.lang.String definition code for java.lang.String  description,
                   CompositeType sample code for javax.management.openmbean.CompositeType definition code for javax.management.openmbean.CompositeType  rowType,
                   String sample code for java.lang.String definition code for java.lang.String [] indexNames)
            throws OpenDataException sample code for javax.management.openmbean.OpenDataException definition code for javax.management.openmbean.OpenDataException 
Constructs a TabularType instance, checking for the validity of the given parameters. The validity constraints are described below for each parameter.

The Java class name of tabular data values this tabular type represents (ie the class name returned by the getClassName sample code for javax.management.openmbean.OpenType.getClassName() definition code for javax.management.openmbean.OpenType.getClassName() method) is set to the string value returned by TabularData.class.getName().

Parameters:
typeName - The name given to the tabular type this instance represents; cannot be a null or empty string.
 
description - The human readable description of the tabular type this instance represents; cannot be a null or empty string.
 
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 the values of which are used to uniquely index each row element in the tabular data values described by this tabular type instance; cannot be null or empty. Each element should be an item name defined in rowType (no null or empty string allowed). It is important to note that the order of the item names in indexNames is used by the methods get sample code for javax.management.openmbean.TabularData.get(java.lang.Object[]) definition code for javax.management.openmbean.TabularData.get(java.lang.Object[]) and remove sample code for javax.management.openmbean.TabularData.remove(java.lang.Object[]) definition code for javax.management.openmbean.TabularData.remove(java.lang.Object[]) of class TabularData to match their array of values parameter to items.
 
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if rowType is null, or indexNames is a null or empty array, or an element in indexNames is a null or empty string, or typeName or description is a null or empty string.
 
OpenDataException sample code for javax.management.openmbean.OpenDataException definition code for javax.management.openmbean.OpenDataException - if an element's value of indexNames is not an item name defined in rowType.
Method Detail

getRowType sample code for javax.management.openmbean.TabularType.getRowType() definition code for javax.management.openmbean.TabularType.getRowType()

public CompositeType sample code for javax.management.openmbean.CompositeType definition code for javax.management.openmbean.CompositeType  getRowType()
Returns the type of the row elements of tabular data values described by this TabularType instance.

Returns:
the type of each row.

getIndexNames sample code for javax.management.openmbean.TabularType.getIndexNames() definition code for javax.management.openmbean.TabularType.getIndexNames()

public List sample code for java.util.List definition code for java.util.List  getIndexNames()

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.

Returns:
a List of String representing the names of the index items.

isValue sample code for javax.management.openmbean.TabularType.isValue(java.lang.Object) definition code for javax.management.openmbean.TabularType.isValue(java.lang.Object)

public boolean isValue(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Tests whether obj is a value which could be described by this TabularType instance.

If obj is null or is not an instance of javax.management.openmbean.TabularData, isValue returns false. If obj is an instance of javax.management.openmbean.TabularData, its tabular type is tested for equality with this tabular type instance, and isValue returns true if and only if equals sample code for javax.management.openmbean.TabularType.equals(java.lang.Object) definition code for javax.management.openmbean.TabularType.equals(java.lang.Object) returns true.
 

Specified by:
isValue sample code for javax.management.openmbean.OpenType.isValue(java.lang.Object) definition code for javax.management.openmbean.OpenType.isValue(java.lang.Object) in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Parameters:
obj - the value whose open type is to be tested for equality with this TabularType instance.
Returns:
true if obj is a value for this tabular type, false otherwise.

equals sample code for javax.management.openmbean.TabularType.equals(java.lang.Object) definition code for javax.management.openmbean.TabularType.equals(java.lang.Object)

public boolean equals(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Compares the specified obj parameter with this TabularType instance for equality.

Two TabularType instances are equal if and only if all of the following statements are true:


 

Specified by:
equals sample code for javax.management.openmbean.OpenType.equals(java.lang.Object) definition code for javax.management.openmbean.OpenType.equals(java.lang.Object) in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Parameters:
obj - the object to be compared for equality with this TabularType instance; if obj is null, equals returns false.
Returns:
true if the specified object is equal to this TabularType instance.
See Also:
Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

hashCode sample code for javax.management.openmbean.TabularType.hashCode() definition code for javax.management.openmbean.TabularType.hashCode()

public int hashCode()
Returns the hash code value for this TabularType instance.

The hash code of a TabularType instance is the sum of the hash codes of all elements of information used in equals comparisons (ie: name, row type, index names). This ensures that t1.equals(t2) implies that t1.hashCode()==t2.hashCode() for any two TabularType instances t1 and t2, as required by the general contract of the method Object.hashCode() sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() .

As TabularType 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.

Specified by:
hashCode sample code for javax.management.openmbean.OpenType.hashCode() definition code for javax.management.openmbean.OpenType.hashCode() in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Returns:
the hash code value for this TabularType instance
See Also:
Object.equals(java.lang.Object) sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable

toString sample code for javax.management.openmbean.TabularType.toString() definition code for javax.management.openmbean.TabularType.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of this TabularType instance.

The string representation consists of the name of this class (ie javax.management.openmbean.TabularType), the type name for this instance, the row type string representation of this instance, and the index names of this instance.

As TabularType 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.

Specified by:
toString sample code for javax.management.openmbean.OpenType.toString() definition code for javax.management.openmbean.OpenType.toString() in class OpenType sample code for javax.management.openmbean.OpenType definition code for javax.management.openmbean.OpenType
Returns:
a string representation of this TabularType instance