javax.management.openmbean
public class TabularType extends OpenType<TabularData>
Since: 1.5
Constructor Summary | |
---|---|
TabularType(String name, String desc, CompositeType rowType, String[] indexNames) Constructs a new {@link TabularType} instance for the given type name, description, row type and index names. |
Method Summary | |
---|---|
boolean | equals(Object obj) Compares this tabular data type with another object for equality. |
List<String> | getIndexNames()
Returns an unmodifiable list containing the index names.
|
CompositeType | getRowType()
Returns the type of the rows used by this tabular data structure.
|
int | hashCode() Returns the hash code of the tabular data type. |
boolean | isValue(Object obj)
Returns true if the specified object is a member of this
tabular type. |
String | toString() Returns a textual representation of this instance. |
Constructs a new {@link TabularType} instance for the given type name, description, row type and index names. All parameters (including the individual elements of the array of index names) must be non-null and those that are of type {@link java.lang.String} must be non-empty. The array of index names must also be non-empty.
The result of TabularData.class.getName()
is adopted
as the class name (see {@link OpenType}). The ordering of the array
elements is relevant in determining the indicies of the values in the
table, and thus in the use of the
{@link TabularData#get(java.lang.Object[])} and
{@link TabularData#remove(java.lang.Object[])} methods of the
{@link TabularData} class.
Parameters: name the name of this tabular type. desc a description of this tabular type. rowType the type of the rows of the table. indexNames the names used to index the rows within the table.
Throws: IllegalArgumentException if any validity constraint listed above is broken. OpenDataException if an index name does not match a corresponding name in the given row type.
Compares this tabular data type with another object for equality. The objects are judged to be equal if:
obj
is not null.obj
is an instance of
{@link TabularType}.Parameters: obj the object to compare with.
Returns: true if the conditions above hold.
Returns: an unmodifiable list of the index names used by this tabular data structure.
Returns: the row type.
Returns the hash code of the tabular data type. This is computed as the sum of the hash codes of the index names together with the hash code of the type name and row type. These are the same elements of the type that are compared as part of the {@link #equals(java.lang.Object)} method, thus ensuring that the hashcode is compatible with the equality test.
As instances of this class are immutable, the hash code is computed just once for each instance and reused throughout its life.
Returns: the hash code of this instance.
Parameters: obj the object to test for membership.
Returns: true if the object is a member of this type.
Returns a textual representation of this instance. This
is constructed using the class name
(javax.management.openmbean.TabularType
)
and each element of the instance which is relevant to
the definition of {@link equals(java.lang.Object)} and
{@link hashCode()} (i.e. the type name, the row type
and the index names).
As instances of this class are immutable, the return value is computed just once for each instance and reused throughout its life.
Returns: a @link{java.lang.String} instance representing the instance in textual form.