javax.management
Class Attribute

java.lang.Object
  |
  +--javax.management.Attribute
All Implemented Interfaces:
java.io.Serializable

public class Attribute
extends java.lang.Object
implements java.io.Serializable

An MBean attribute which is a name value pair combination.

Version:
$Revision: 1.4 $
Author:
Simone Bordet
See Also:
Serialized Form

Constructor Summary
Attribute(java.lang.String name, java.lang.Object value)
          Creates an Attribute with the given name and value.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks the given obj for equality with this Attribute.
 java.lang.String getName()
          Return the name of this Attribute.
 java.lang.Object getValue()
          Returns the value of this Attribute.
 int hashCode()
          Returns the hashCode
 java.lang.String toString()
          Returns a String representation of this Attribtue.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(java.lang.String name,
                 java.lang.Object value)
Creates an Attribute with the given name and value.

Note: The value of name cant be null.

Parameters:
name - The name of the attribute
value - The value of the attribute
Throws:
RuntimeOperationsException - Wraps an IllegalArgumentException if the value of name is null.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks the given obj for equality with this Attribute.
Overrides:
equals in class java.lang.Object
Parameters:
obj - The object being checked against.
Returns:
true If obj is equal to this Attribute, false otherwise.

hashCode

public int hashCode()
Returns the hashCode
Overrides:
hashCode in class java.lang.Object
Returns:
int The hashCode

getName

public java.lang.String getName()
Return the name of this Attribute.
Returns:
String The name of this Attribute

getValue

public java.lang.Object getValue()
Returns the value of this Attribute.
Returns:
Object The value of this Attribute

toString

public java.lang.String toString()
Returns a String representation of this Attribtue.

Representation is in the form: Attribute's name: n, value: v

Overrides:
toString in class java.lang.Object


Copyright © 2001-2002 MX4J Team. All Rights Reserved.