APIdia Launch Partner
Top Description Fields Constructors Methods
javax.management

public Class Attribute

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable

Represents an MBean attribute by associating its name with its value. The MBean server and other objects use this class to get and set attributes values.
Since
1.5

Field Summary

Modifier and TypeField and Description
private String
private static final long
private Object

Constructor Summary

AccessConstructor and Description
public
Attribute(String
A String containing the name of the attribute to be created. Cannot be null.
name
,
Object
The Object which is assigned to the attribute. This object must be of the same type as the attribute.
value
)

Constructs an Attribute object which associates the given attribute name with the given value.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if the two Attribute objects are equal, otherwise false.
equals
(Object
The Attribute that the current Attribute is to be compared with.
object
)

Overrides java.lang.Object.equals.

Compares the current Attribute Object with another Attribute Object.

public String

Returns:

the name of the attribute.
getName
()

Returns a String containing the name of the attribute.

public Object

Returns:

the value of the attribute.
getValue
()

Returns an Object that is the value of this attribute.

public int

Returns:

a hash code value for this attribute.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this attribute.

public String
toString()

Overrides java.lang.Object.toString.

Returns a String object representing this Attribute's value.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

nameback to summary
private String name
serialVersionUIDback to summary
private static final long serialVersionUID
valueback to summary
private Object value
Annotations
@SuppressWarnings:serial

Constructor Detail

Attributeback to summary
public Attribute(String name, Object value)

Constructs an Attribute object which associates the given attribute name with the given value.

Parameters
name:String

A String containing the name of the attribute to be created. Cannot be null.

value:Object

The Object which is assigned to the attribute. This object must be of the same type as the attribute.

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Compares the current Attribute Object with another Attribute Object.

Parameters
object:Object

The Attribute that the current Attribute is to be compared with.

Returns:boolean

True if the two Attribute objects are equal, otherwise false.

getNameback to summary
public String getName()

Returns a String containing the name of the attribute.

Returns:String

the name of the attribute.

getValueback to summary
public Object getValue()

Returns an Object that is the value of this attribute.

Returns:Object

the value of the attribute.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this attribute.

Returns:int

a hash code value for this attribute.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a String object representing this Attribute's value. The format of this string is not specified, but users can expect that two Attributes return the same string if and only if they are equal.