This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management.openmbean
class TabularType

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

public class TabularType
extends OpenType

The TabularType class is the open type class whose instances describe the types of {@link TabularData TabularData} values.


Field Summary
 
Fields inherited from class javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES, ALLOWED_CLASSNAMES_LIST
 
Constructor Summary
TabularType(String typeName, String description, CompositeType rowType, String[] indexNames)

          Constructs a TabularType instance, checking for the validity of the given parameters.
 
Method Summary
 boolean

          Compares the specified obj parameter with this TabularType instance for equality.
 List

          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

          Returns the type of the row elements of tabular data values described by this TabularType instance.
 int

          Returns the hash code value for this TabularType instance.
 boolean

          Tests whether obj is a value which could be described by this TabularType instance.
 String

          Returns a string representation of this TabularType instance.
 
Methods inherited from class javax.management.openmbean.OpenType
equals, getClassName, getDescription, getTypeName, hashCode, isArray, isValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabularType

public TabularType(String typeName,
                   String description,
                   CompositeType rowType,
                   String[] indexNames)
            throws 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 {@link OpenType#getClassName() 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 {@link TabularData#get(java.lang.Object[]) get} and {@link TabularData#remove(java.lang.Object[]) remove} of class TabularData to match their array of values parameter to items.
 
Throws:
OpenDataException - if an element's value of indexNames is not an item name defined in rowType.
Method Detail

equals

public boolean equals(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:


 

Overrides:
equals in class 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.

getIndexNames

public 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.

getRowType

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

Returns:
the type of each row.

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 {@link Object#hashCode() 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.

Overrides:
hashCode in class OpenType
Returns:
the hash code value for this TabularType instance

isValue

public boolean isValue(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, say {@code td}, the result is true if this {@code TabularType} is assignable from {@link TabularData#getTabularType() td.getTabularType()}, as defined in {@link CompositeType#isValue CompositeType.isValue}.

Overrides:
isValue in class OpenType
Parameters:
obj - the value whose open type is to be tested for compatibility with this TabularType instance.
Returns:
true if obj is a value for this tabular type, false otherwise.

toString

public 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.

Overrides:
toString in class OpenType
Returns:
a string representation of this TabularType instance


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.