This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management.openmbean
class OpenMBeanParameterInfoSupport

java.lang.Object extended by javax.management.MBeanFeatureInfo extended by javax.management.MBeanParameterInfo extended by javax.management.openmbean.OpenMBeanParameterInfoSupport
All Implemented Interfaces:
Serializable, Cloneable, DescriptorRead, OpenMBeanParameterInfo

public class OpenMBeanParameterInfoSupport
extends MBeanParameterInfo
implements OpenMBeanParameterInfo

Describes a parameter used in one or more operations or constructors of an open MBean.


Field Summary
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType)

          Constructs an instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified , and .
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Descriptor descriptor)

          Constructs an instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified , , , and .
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue)

          Constructs an instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified , , and .
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue, Comparable minValue, Comparable maxValue)

          Constructs an instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified , , , , and .
OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue, Object[] legalValues)

          Constructs an instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified , , , and .
 
Method Summary
 boolean

          Compares the specified parameter with this instance for equality.
 Object

          Returns the default value for the parameter described by this instance, if specified, or otherwise.
 Set

          Returns an unmodifiable Set of legal values for the parameter described by this instance, if specified, or otherwise.
 Comparable

          Returns the maximal value for the parameter described by this instance, if specified, or otherwise.
 Comparable

          Returns the minimal value for the parameter described by this instance, if specified, or otherwise.
 OpenType

          Returns the open type for the values of the parameter described by this instance.
 boolean

          Returns if this instance specifies a non-null default value for the described parameter, otherwise.
 int

          Returns the hash code value for this instance.
 boolean

          Returns if this instance specifies a non-null set of legal values for the described parameter, otherwise.
 boolean

          Returns if this instance specifies a non-null maximal value for the described parameter, otherwise.
 boolean

          Returns if this instance specifies a non-null minimal value for the described parameter, otherwise.
 boolean

          Tests whether is a valid value for the parameter described by this instance.
 String

          Returns a string representation of this instance.
 
Methods inherited from class javax.management.MBeanParameterInfo
clone, equals, getType, hashCode, toString
 
Methods inherited from class javax.management.MBeanFeatureInfo
equals, getDescription, getDescriptor, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType)
Constructs an {@code OpenMBeanParameterInfoSupport} instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified {@code name}, {@code openType} and {@code description}.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Descriptor descriptor)

Constructs an {@code OpenMBeanParameterInfoSupport} instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified {@code name}, {@code openType}, {@code description}, and {@code descriptor}.

The {@code descriptor} can contain entries that will define the values returned by certain methods of this class, as explained in the {@link package description}.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
descriptor - The descriptor for the parameter. This may be null which is equivalent to an empty descriptor.

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Object defaultValue)
                              throws OpenDataException
Constructs an {@code OpenMBeanParameterInfoSupport} instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified {@code name}, {@code openType}, {@code description} and {@code defaultValue}.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
defaultValue - must be a valid value for the {@code openType} specified for this parameter; default value not supported for {@code ArrayType} and {@code TabularType}; can be null, in which case it means that no default value is set.
Throws:
OpenDataException - if {@code defaultValue} is not a valid value for the specified {@code openType}, or {@code defaultValue} is non null and {@code openType} is an {@code ArrayType} or a {@code TabularType}.

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Object defaultValue,
                                     Comparable minValue,
                                     Comparable maxValue)
                              throws OpenDataException
Constructs an {@code OpenMBeanParameterInfoSupport} instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified {@code name}, {@code openType}, {@code description}, {@code defaultValue}, {@code minValue} and {@code maxValue}. It is possible to specify minimal and maximal values only for an open type whose values are {@code Comparable}.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
defaultValue - must be a valid value for the {@code openType} specified for this parameter; default value not supported for {@code ArrayType} and {@code TabularType}; can be null, in which case it means that no default value is set.
minValue - must be valid for the {@code openType} specified for this parameter; can be null, in which case it means that no minimal value is set.
maxValue - must be valid for the {@code openType} specified for this parameter; can be null, in which case it means that no maximal value is set.
Throws:
OpenDataException - if {@code defaultValue}, {@code minValue} or {@code maxValue} is not a valid value for the specified {@code openType}, or {@code defaultValue} is non null and {@code openType} is an {@code ArrayType} or a {@code TabularType}, or both {@code minValue} and {@code maxValue} are non-null and {@code minValue.compareTo(maxValue) > 0} is {@code true}, or both {@code defaultValue} and {@code minValue} are non-null and {@code minValue.compareTo(defaultValue) > 0} is {@code true}, or both {@code defaultValue} and {@code maxValue} are non-null and {@code defaultValue.compareTo(maxValue) > 0} is {@code true}.

OpenMBeanParameterInfoSupport

public OpenMBeanParameterInfoSupport(String name,
                                     String description,
                                     OpenType openType,
                                     Object defaultValue,
                                     Object[] legalValues)
                              throws OpenDataException

Constructs an {@code OpenMBeanParameterInfoSupport} instance, which describes the parameter used in one or more operations or constructors of a class of open MBeans, with the specified {@code name}, {@code openType}, {@code description}, {@code defaultValue} and {@code legalValues}.

The contents of {@code legalValues} are copied, so subsequent modifications of the array referenced by {@code legalValues} have no impact on this {@code OpenMBeanParameterInfoSupport} instance.

Parameters:
name - cannot be a null or empty string.
description - cannot be a null or empty string.
openType - cannot be null.
defaultValue - must be a valid value for the {@code openType} specified for this parameter; default value not supported for {@code ArrayType} and {@code TabularType}; can be null, in which case it means that no default value is set.
legalValues - each contained value must be valid for the {@code openType} specified for this parameter; legal values not supported for {@code ArrayType} and {@code TabularType}; can be null or empty.
Throws:
OpenDataException - if {@code defaultValue} is not a valid value for the specified {@code openType}, or one value in {@code legalValues} is not valid for the specified {@code openType}, or {@code defaultValue} is non null and {@code openType} is an {@code ArrayType} or a {@code TabularType}, or {@code legalValues} is non null and non empty and {@code openType} is an {@code ArrayType} or a {@code TabularType}, or {@code legalValues} is non null and non empty and {@code defaultValue} is not contained in {@code legalValues}.
Method Detail

equals

public boolean equals(Object obj)

Compares the specified {@code obj} parameter with this {@code OpenMBeanParameterInfoSupport} instance for equality.

Returns {@code true} if and only if all of the following statements are true:

This ensures that this {@code equals} method works properly for {@code obj} parameters which are different implementations of the {@code OpenMBeanParameterInfo} interface.

If {@code obj} also implements {@link DescriptorRead}, then its {@link DescriptorRead#getDescriptor() getDescriptor()} method must also return the same value as for this object.

Overrides:
equals in class MBeanParameterInfo
Parameters:
obj - the object to be compared for equality with this {@code OpenMBeanParameterInfoSupport} instance.
Returns:
{@code true} if the specified object is equal to this {@code OpenMBeanParameterInfoSupport} instance.

getDefaultValue

public Object getDefaultValue()
Returns the default value for the parameter described by this {@code OpenMBeanParameterInfoSupport} instance, if specified, or {@code null} otherwise.


getLegalValues

public Set getLegalValues()
Returns an unmodifiable Set of legal values for the parameter described by this {@code OpenMBeanParameterInfoSupport} instance, if specified, or {@code null} otherwise.


getMaxValue

public Comparable getMaxValue()
Returns the maximal value for the parameter described by this {@code OpenMBeanParameterInfoSupport} instance, if specified, or {@code null} otherwise.


getMinValue

public Comparable getMinValue()
Returns the minimal value for the parameter described by this {@code OpenMBeanParameterInfoSupport} instance, if specified, or {@code null} otherwise.


getOpenType

public OpenType getOpenType()
Returns the open type for the values of the parameter described by this {@code OpenMBeanParameterInfoSupport} instance.


hasDefaultValue

public boolean hasDefaultValue()
Returns {@code true} if this {@code OpenMBeanParameterInfoSupport} instance specifies a non-null default value for the described parameter, {@code false} otherwise.


hashCode

public int hashCode()

Returns the hash code value for this {@code OpenMBeanParameterInfoSupport} instance.

The hash code of an {@code OpenMBeanParameterInfoSupport} instance is the sum of the hash codes of all elements of information used in {@code equals} comparisons (ie: its name, its open type, its default, min, max and legal values, and its Descriptor).

This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} for any two {@code OpenMBeanParameterInfoSupport} instances {@code t1} and {@code t2}, as required by the general contract of the method {@link Object#hashCode() Object.hashCode()}.

However, note that another instance of a class implementing the {@code OpenMBeanParameterInfo} interface may be equal to this {@code OpenMBeanParameterInfoSupport} instance as defined by {@link #equals(java.lang.Object)}, but may have a different hash code if it is calculated differently.

As {@code OpenMBeanParameterInfoSupport} instances are immutable, the hash code for this instance is calculated once, on the first call to {@code hashCode}, and then the same value is returned for subsequent calls.

Overrides:
hashCode in class MBeanParameterInfo
Returns:
the hash code value for this {@code OpenMBeanParameterInfoSupport} instance

hasLegalValues

public boolean hasLegalValues()
Returns {@code true} if this {@code OpenMBeanParameterInfoSupport} instance specifies a non-null set of legal values for the described parameter, {@code false} otherwise.


hasMaxValue

public boolean hasMaxValue()
Returns {@code true} if this {@code OpenMBeanParameterInfoSupport} instance specifies a non-null maximal value for the described parameter, {@code false} otherwise.


hasMinValue

public boolean hasMinValue()
Returns {@code true} if this {@code OpenMBeanParameterInfoSupport} instance specifies a non-null minimal value for the described parameter, {@code false} otherwise.


isValue

public boolean isValue(Object obj)
Tests whether {@code obj} is a valid value for the parameter described by this {@code OpenMBeanParameterInfo} instance.

Parameters:
obj - the object to be tested.
Returns:
{@code true} if {@code obj} is a valid value for the parameter described by this {@code OpenMBeanParameterInfo} instance, {@code false} otherwise.

toString

public String toString()
Returns a string representation of this {@code OpenMBeanParameterInfoSupport} instance.

The string representation consists of the name of this class (i.e. {@code javax.management.openmbean.OpenMBeanParameterInfoSupport}), the string representation of the name and open type of the described parameter, the string representation of its default, min, max and legal values and the string representation of its descriptor.

As {@code OpenMBeanParameterInfoSupport} instances are immutable, the string representation for this instance is calculated once, on the first call to {@code toString}, and then the same value is returned for subsequent calls.

Overrides:
toString in class MBeanParameterInfo
Returns:
a string representation of this {@code OpenMBeanParameterInfoSupport} instance.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.