站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

Attribute (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management
Class Attribute

java.lang.Object
  extended byjavax.management.Attribute
All Implemented Interfaces:
Serializable

public class Attribute
extends Object
implements Serializable

A representation of an MBean attribute. It is a pair, a Name and a Value.

An Attribute is returned by a getter operation or passed to a a setter operation.

Version:
$Revision: 1.6 $

Revisions:

20020730 Adrian Brock:

  • Serialization

20020930 Juha Lindfors:

  • Overrode hashCode() to return same hash for objects that are equal
  • Removed 'instanceof' from equals() as it tends to break the symmetricity requirement when subclasses are involved
Author:
Juha Lindfors., Adrian Brock.
See Also:
Serialized Form

Constructor Summary
Attribute(String name, Object value)
          Contruct a new attribute given a name and value.
 
Method Summary
 boolean equals(Object object)
          Compares two attributes for equality.
 String getName()
          Retrieves the name of the attribute.
 Object getValue()
          Retrieves the value of the attribute.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(String name,
                 Object value)
Contruct a new attribute given a name and value.

Parameters:
name - the name of the attribute.
value - the value of the attribute.
Method Detail

getName

public String getName()
Retrieves the name of the attribute.

Returns:
the name of the attribute.

getValue

public Object getValue()
Retrieves the value of the attribute.

Returns:
the value of the attribute.

equals

public boolean equals(Object object)
Compares two attributes for equality.

Returns:
true when the name value objects are equal, false otherwise.

hashCode

public int hashCode()

toString

public String toString()
Returns:
human readable string.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.