| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 . |
|
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 |
hashCode() 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 |
toString() 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 |
---|
public OpenMBeanParameterInfoSupport(String name, String description, OpenType openType)
name
- cannot be a null or empty string.description
- cannot be a null or empty string.openType
- cannot be null.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}.
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.public OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue) throws OpenDataException
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.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}.public OpenMBeanParameterInfoSupport(String name, String description, OpenType openType, Object defaultValue, Comparable minValue, Comparable maxValue) throws OpenDataException
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.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}.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.
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.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 |
---|
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:
If {@code obj} also implements {@link DescriptorRead}, then its {@link DescriptorRead#getDescriptor() getDescriptor()} method must also return the same value as for this object.
equals
in class MBeanParameterInfo
obj
- the object to be compared for equality with this
{@code OpenMBeanParameterInfoSupport} instance.public Object getDefaultValue()
public Set getLegalValues()
public Comparable getMaxValue()
public Comparable getMinValue()
public OpenType getOpenType()
public boolean hasDefaultValue()
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.
hashCode
in class MBeanParameterInfo
public boolean hasLegalValues()
public boolean hasMaxValue()
public boolean hasMinValue()
public boolean isValue(Object obj)
obj
- the object to be tested.public String toString()
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.
toString
in class MBeanParameterInfo
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |