Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.management
Class Attribute

    java.lang.Object
      javax.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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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