public class MBeanFeatureInfo extends Object implements Serializable, DescriptorRead
MBean描述符对象提供一般信息。所描述的功能可以是一个属性、一个操作、一个参数或一个通知。这个类的实例是不可变的。子类可以是可变的但这是不推荐的。
| Modifier and Type | Field and Description |
|---|---|
protected String |
description
对特征的人类可读的描述。
|
protected String |
name
特征的名称。
|
| Constructor and Description |
|---|
MBeanFeatureInfo(String name, String description)
构建了一个
MBeanFeatureInfo对象。
|
MBeanFeatureInfo(String name, String description, Descriptor descriptor)
构建了一个
MBeanFeatureInfo对象。
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
比较这mbeanfeatureinfo到另一个。
|
String |
getDescription()
返回对特征的人类可读的描述。
|
Descriptor |
getDescriptor()
返回特征的描述符。
|
String |
getName()
返回特征的名称。
|
int |
hashCode()
返回一个对象的哈希代码值。
|
protected String description
getDescription()阅读这个领域,并且他们不改变它。
public MBeanFeatureInfo(String name, String description)
MBeanFeatureInfo对象。此构造函数相当于
MBeanFeatureInfo(name, description, (Descriptor) null。
name特征的名称。
description -人类可读的描述的特征。
public MBeanFeatureInfo(String name, String description, Descriptor descriptor)
MBeanFeatureInfo对象。
name特征的名称。
description -人类可读的描述的特征。
descriptor -特征描述符。这可能是空的,这相当于一个空的描述符。
public String getName()
public String getDescription()
public Descriptor getDescriptor()
getDescriptor 接口
DescriptorRead
public boolean equals(Object o)
equals 方法重写,继承类
Object
o -对象比较。
o是mbeanfeatureinfo,
getName(),
getDescription()真实,和
getDescriptor()值相等(不一定是相同的)的这mbeanfeatureinfo。
Object.hashCode(),
HashMap
public int hashCode()
Object
HashMap利益支持。
对hashCode一般合同:
hashCode方法总是返回相同的整数,没有提供信息用于equals比较的对象被修改。这个整数不需要保持一致,从一个应用程序的一个执行到另一个执行相同的应用程序。equals(Object)法两个对象是相等的,那么调用hashCode方法每一个对象必须产生相同的整数结果。Object.equals(java.lang.Object)法两个对象是不平等的,然后调用hashCode方法每一个对象必须产生不同的整数结果。然而,程序员应该意识到,产生不同的整数结果的不平等的对象可能会提高哈希表的性能。尽合理的切实可行,由类Object定义hashCode方法返回不同的对象不同的整数。(这通常是通过将该对象的内部地址转换成一个整数,但这不是实现实现技术的™java编程语言。要求)
hashCode 方法重写,继承类
Object
Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.