javax.management
Class Attribute

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

public class Attribute
extends Object
implements Serializable

Represents an MBean attribute, having the name and the assigned value. The MBean objects use this class to get and set attributes values.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
Attribute(String name, Object value)
          Create the attribute with the given name and value.
 
Method Summary
 boolean equals(Object other)
          Compares the attribute with another attribute.
 String getName()
          Returns the attribute name.
 Object getValue()
          Returns the attribute value.
 int hashCode()
          Need to override as equals(java.lang.Object) is overridden.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(String name,
                 Object value)
Create the attribute with the given name and value.

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

equals

public boolean equals(Object other)
Compares the attribute with another attribute.

Overrides:
equals in class Object
Parameters:
other - the other object to compare with
Returns:
true if both value and object are equal, false otherwise.
See Also:
Object.hashCode()

getName

public String getName()
Returns the attribute name.

Returns:
the attribute name

getValue

public Object getValue()
Returns the attribute value.

Returns:
the attribute value.

hashCode

public int hashCode()
Need to override as equals(java.lang.Object) is overridden.

Overrides:
hashCode in class Object
Returns:
the expression, dependent of the object and name hashcodes.
See Also:
Object.equals(Object), System.identityHashCode(Object)