Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.management.openmbean
Class CompositeDataSupport  view CompositeDataSupport download CompositeDataSupport.java

java.lang.Object
  extended byjavax.management.openmbean.CompositeDataSupport
All Implemented Interfaces:
CompositeData, java.io.Serializable

public class CompositeDataSupport
extends java.lang.Object
implements CompositeData, java.io.Serializable

An implementation of CompositeData.

Version:
$Revision: 1.1.2.1 $

Field Summary
private  CompositeType compositeType
          The composite type of the composite data
private  java.util.SortedMap contents
          The contents of the composite data
private static java.io.ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
 
Constructor Summary
CompositeDataSupport(CompositeType compositeType, java.util.Map items)
          Construct Composite Data
CompositeDataSupport(CompositeType compositeType, java.lang.String[] itemNames, java.lang.Object[] itemValues)
          Construct Composite Data
 
Method Summary
 boolean containsKey(java.lang.String key)
          Tests whether a key is part of this composite data
 boolean containsValue(java.lang.Object value)
          Tests whether a item exists with the passed value
 boolean equals(java.lang.Object obj)
          Tests whether two composite data objects are equal
 java.lang.Object get(java.lang.String key)
          Retrieve the value for the item with the passed key
 java.lang.Object[] getAll(java.lang.String[] keys)
          Retrieve the arrray of values for the item with the passed keys
 CompositeType getCompositeType()
          Retrieve the composite type for this composite data
 int hashCode()
          Generates a hashcode for the implementation.
private  void init(CompositeType compositeType, java.util.Map items)
          Initialise the composite data
private  void readObject(java.io.ObjectInputStream in)
           
 java.lang.String toString()
          A string representation of the open mbean operation info.
 void validateKey(java.lang.String key)
          Validates the key against the composite type
 java.util.Collection values()
          The values of this composite data
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

serialPersistentFields

private static final java.io.ObjectStreamField[] serialPersistentFields

contents

private java.util.SortedMap contents
The contents of the composite data


compositeType

private CompositeType compositeType
The composite type of the composite data

Constructor Detail

CompositeDataSupport

public CompositeDataSupport(CompositeType compositeType,
                            java.lang.String[] itemNames,
                            java.lang.Object[] itemValues)
                     throws OpenDataException
Construct Composite Data


CompositeDataSupport

public CompositeDataSupport(CompositeType compositeType,
                            java.util.Map items)
                     throws OpenDataException
Construct Composite Data

Method Detail

getCompositeType

public CompositeType getCompositeType()
Description copied from interface: CompositeData
Retrieve the composite type for this composite data

Specified by:
getCompositeType in interface CompositeData

get

public java.lang.Object get(java.lang.String key)
Description copied from interface: CompositeData
Retrieve the value for the item with the passed key

Specified by:
get in interface CompositeData

getAll

public java.lang.Object[] getAll(java.lang.String[] keys)
Description copied from interface: CompositeData
Retrieve the arrray of values for the item with the passed keys

Specified by:
getAll in interface CompositeData

containsKey

public boolean containsKey(java.lang.String key)
Description copied from interface: CompositeData
Tests whether a key is part of this composite data

Specified by:
containsKey in interface CompositeData

containsValue

public boolean containsValue(java.lang.Object value)
Description copied from interface: CompositeData
Tests whether a item exists with the passed value

Specified by:
containsValue in interface CompositeData

values

public java.util.Collection values()
Description copied from interface: CompositeData
The values of this composite data

An iterator over the returned collection returns result in ascending lexicographic order

Specified by:
values in interface CompositeData

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException

equals

public boolean equals(java.lang.Object obj)
Description copied from interface: CompositeData
Tests whether two composite data objects are equal

The object is non-null
The object implements this interface
The composite types are equal
The values are equal

Specified by:
equals in interface CompositeData

hashCode

public int hashCode()
Description copied from interface: CompositeData
Generates a hashcode for the implementation.

The sum of the hashCodes for the elements mentioned in the equals method

Specified by:
hashCode in interface CompositeData

toString

public java.lang.String toString()
Description copied from interface: CompositeData
A string representation of the open mbean operation info.

It is made up of implementation class and the values mentioned in the equals method

Specified by:
toString in interface CompositeData

init

private void init(CompositeType compositeType,
                  java.util.Map items)
           throws OpenDataException
Initialise the composite data


validateKey

public void validateKey(java.lang.String key)
                 throws InvalidKeyException
Validates the key against the composite type