|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.management.openmbean.OpenType<TabularData>
javax.management.openmbean.TabularType
public class TabularType
TabularType 类是开放类型 类,它的实例描述了 值的类型。
TabularData
| 字段摘要 |
|---|
| 从类 javax.management.openmbean.OpenType 继承的字段 |
|---|
ALLOWED_CLASSNAMES, ALLOWED_CLASSNAMES_LIST |
| 构造方法摘要 | |
|---|---|
TabularType(String typeName,
String description,
CompositeType rowType,
String[] indexNames)
构造一个 TabularType 实例,检查给定参数的有效性。 |
|
| 方法摘要 | |
|---|---|
boolean |
equals(Object obj)
比较指定的 obj 参数与此 TabularType 实例的相等性。 |
List<String> |
getIndexNames()
按照提供此实例的构造方法的顺序返回一个不可修改的项名称列表,可以使用该列表的值唯一地索引此 TabularType 实例所描述的表格数据值的每个行元素。 |
CompositeType |
getRowType()
返回此 TabularType 实例描述的表格数据值的行元素的类型。 |
int |
hashCode()
返回此 TabularType 实例的哈希码值。 |
boolean |
isValue(Object obj)
测试 obj 是否为此 TabularType 实例可以描述的值。 |
String |
toString()
返回此 TabularType 实例的字符串表示形式。 |
| 从类 javax.management.openmbean.OpenType 继承的方法 |
|---|
getClassName, getDescription, getTypeName, isArray |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public TabularType(String typeName,
String description,
CompositeType rowType,
String[] indexNames)
throws OpenDataException
TabularType 实例,检查给定参数的有效性。下面描述了每个参数的有效性约束。
此表格类型表示的表格数据值的 Java 类名称(即 getClassName 方法返回的类名称)被设置为 TabularData.class.getName() 返回的字符串值。
typeName - 此实例表示的表格类型所给定的名称;不可以为 null 或空字符串。description - 此实例表示的表格类型的可读描述;不可以为 null 或空字符串。rowType - 此表格类型实例所描述的表格数据值的行元素类型;不可以为 null。indexNames - 项名称,可以使用它的值唯一地索引此表格类型实例所描述的表格数据值中的每个行元素;不可以为 null 或空。每个元素都应该是 rowType 中定义的项名称(不允许为 null 或空字符串)。需要特别注意的是,TabularData 类的方法 get 和 remove 使用 indexNames 中项名称的顺序来匹配值参数数组和项。IllegalArgumentException - 如果 rowType 为 null;如果 indexNames 为 null 或者为空数组;如果 indexNames 中的元素为 null 或者空字符串;如果 typeName 或 description 为 null 或者空字符串。OpenDataException - 如果 indexNames 的元素值不是 rowType 中定义的项名称。| 方法详细信息 |
|---|
public CompositeType getRowType()
TabularType 实例描述的表格数据值的行元素的类型。
public List<String> getIndexNames()
按照提供此实例的构造方法的顺序返回一个不可修改的项名称列表,可以使用该列表的值唯一地索引此 TabularType 实例所描述的表格数据值的每个行元素。
public boolean isValue(Object obj)
TabularType 实例可以描述的值。
如果 obj 为 null 或者不是 javax.management.openmbean.TabularData 的实例,则 isValue 返回 false。
如果 obj 是一个 javax.management.openmbean.TabularData 的实例(如 td),则当此 TabularType 根据 CompositeType.isValue 中的定义可通过 td.getTabularType() 进行分配时,结果为 true。
OpenType<TabularData> 中的 isValueobj - 将测试其开放类型与此 TabularType 实例的相等性的值。
true,否则返回 false。public boolean equals(Object obj)
obj 参数与此 TabularType 实例的相等性。
当且仅当下面的语句均为 true 时,两个 TabularType 实例才相等:
OpenType<TabularData> 中的 equalsobj - 与此 TabularType 实例进行相等性比较的对象;如果 obj 为 null,则 equals 返回 false。
TabularType 实例,则返回 true。Object.hashCode(),
Hashtablepublic int hashCode()
TabularType 实例的哈希码值。
TabularType 实例的哈希码是在 equals 比较中使用的信息的所有元素的哈希码总和(即名称、行类型、索引名称)。这确保了 t1.equals(t2) 意味着对于任何两个 TabularType 实例 t1 和 t2 而言,都存在 t1.hashCode()==t2.hashCode(),这是方法 Object.hashCode() 的通用协定所要求的。
由于 TabularType 实例是不可变的,此实例的哈希码在首次调用 hashCode 时被计算一次,然后对后续调用返回相同的值。
OpenType<TabularData> 中的 hashCodeTabularType 实例的哈希码值Object.equals(java.lang.Object),
Hashtablepublic String toString()
TabularType 实例的字符串表示形式。
字符串表示形式由此类(即 javax.management.openmbean.TabularType)的名称、此实例的类型名称、此实例的行类型字符串表示形式以及此实例的索引名称组成。
由于 TabularType 实例是不可变的,此实例的字符串表示形式在首次调用 toString 时被计算一次,然后对后续调用返回相同的值。
OpenType<TabularData> 中的 toStringTabularType 实例的字符串表示形式
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。