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

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


javax.management.openmbean
Class CompositeType

java.lang.Object
  extended byjavax.management.openmbean.OpenType
      extended byjavax.management.openmbean.CompositeType
All Implemented Interfaces:
Serializable

public class CompositeType
extends OpenType
implements Serializable

The CompositeType is an OpenType that describes CompositeData.

Version:
$Revision: 1.5 $
Author:
Adrian Brock., Thomas Diesler.
See Also:
CompositeData, Serialized Form

Field Summary
 
Fields inherited from class javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES
 
Constructor Summary
CompositeType(String typeName, String description, String[] itemNames, String[] itemDescriptions, OpenType[] itemTypes)
          Construct a composite type.
 
Method Summary
 boolean containsKey(String itemName)
          Determine whether this CompositeType contains the itemName
 boolean equals(Object obj)
          Tests for equality with another composite type
 String getDescription(String itemName)
          Retrieve the description for an item name
 OpenType getType(String itemName)
          Retrieve the open type for an item name
 int hashCode()
          Retrieve the hashCode for this OpenType
 boolean isValue(Object obj)
          Determines whether the object is a value of the this composite type.
 Set keySet()
          Retrieve an unmodifiable Set view of all the item names in ascending order.
 String toString()
          Retrieve a string representation of this open type
 
Methods inherited from class javax.management.openmbean.OpenType
getClassName, getDescription, getTypeName, isArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeType

public CompositeType(String typeName,
                     String description,
                     String[] itemNames,
                     String[] itemDescriptions,
                     OpenType[] itemTypes)
              throws OpenDataException
Construct a composite type. The parameters are checked for validity.

The three arrays are internally copied. Future changes to these arrays do not alter the composite type.

getClassName() returns javax.management.openbean.CompositeData

Parameters:
typeName - the name of the composite type, cannot be null or empty
description - the human readable description of the composite type, cannot be null or empty
itemNames - the names of the items described by this type. Cannot be null, must contain at least one element, the elements cannot be null or empty. The order of the items is unimportant when determining equality.
itemDescriptions - the human readable descriptions of the items in the same order as the itemNames, cannot be null must have the same number of elements as the itemNames. The elements cannot be null or empty.
itemTypes - the OpenTypes of the items in the same order as the item names, cannot be null must have the same number of elements as the itemNames. The elements cannot be null.
Throws:
OpenDataException - when itemNames contains a duplicate name. The names are case sensitive, leading and trailing whitespace is ignored.
IllegalArgumentException - when a parameter does not match what is described above.
Method Detail

containsKey

public boolean containsKey(String itemName)
Determine whether this CompositeType contains the itemName

Parameters:
itemName - the item name
Returns:
true when it does, false otherwise

getDescription

public String getDescription(String itemName)
Retrieve the description for an item name

Parameters:
itemName - the item name
Returns:
the description or null when there is no such item name

getType

public OpenType getType(String itemName)
Retrieve the open type for an item name

Parameters:
itemName - the item name
Returns:
the open type or null when there is no such item name

keySet

public Set keySet()
Retrieve an unmodifiable Set view of all the item names in ascending order.

Returns:
the Set

isValue

public boolean isValue(Object obj)
Determines whether the object is a value of the this composite type.

The object must not be null and it must be an instance of javax.management.openbean.CompositeData. The CompositeType of the CompositeData have equality with this CompositeType.

Specified by:
isValue in class OpenType
Parameters:
obj - the object to test
Returns:
the true when the above condition is satisfied, false otherwise

equals

public boolean equals(Object obj)
Tests for equality with another composite type

The type names must be equal.
The item names and types are equal.

Specified by:
equals in class OpenType
Parameters:
obj - the other composite type to test
Returns:
the true when the above condition is satisfied, false otherwise

hashCode

public int hashCode()
Description copied from class: OpenType
Retrieve the hashCode for this OpenType

Specified by:
hashCode in class OpenType
Returns:
the hash code

toString

public String toString()
Description copied from class: OpenType
Retrieve a string representation of this open type

Specified by:
toString in class OpenType
Returns:
the string representation


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