51 |
51 |
52 // Re-declares the methods that are in class MBeanAttributeInfo of JMX 1.0 |
52 // Re-declares the methods that are in class MBeanAttributeInfo of JMX 1.0 |
53 // (these will be removed when MBeanAttributeInfo is made a parent interface of this interface) |
53 // (these will be removed when MBeanAttributeInfo is made a parent interface of this interface) |
54 |
54 |
55 /** |
55 /** |
56 * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance is readable, |
56 * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} |
57 * <tt>false</tt> otherwise. |
57 * instance is readable, {@code false} otherwise. |
58 * |
58 * |
59 * @return true if the attribute is readable. |
59 * @return true if the attribute is readable. |
60 */ |
60 */ |
61 public boolean isReadable() ; |
61 public boolean isReadable() ; |
62 |
62 |
63 /** |
63 /** |
64 * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance is writable, |
64 * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} |
65 * <tt>false</tt> otherwise. |
65 * instance is writable, {@code false} otherwise. |
66 * |
66 * |
67 * @return true if the attribute is writable. |
67 * @return true if the attribute is writable. |
68 */ |
68 */ |
69 public boolean isWritable() ; |
69 public boolean isWritable() ; |
70 |
70 |
71 /** |
71 /** |
72 * Returns <tt>true</tt> if the attribute described by this <tt>OpenMBeanAttributeInfo</tt> instance |
72 * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} instance |
73 * is accessed through a <tt>is<i>XXX</i></tt> getter (applies only to <tt>boolean</tt> and <tt>Boolean</tt> values), |
73 * is accessed through a <code>is<i>XXX</i></code> getter |
74 * <tt>false</tt> otherwise. |
74 * (applies only to {@code boolean} and {@code Boolean} values), |
|
75 * {@code false} otherwise. |
75 * |
76 * |
76 * @return true if the attribute is accessed through <tt>is<i>XXX</i></tt>. |
77 * @return true if the attribute is accessed through <code>is<i>XXX</i></code>. |
77 */ |
78 */ |
78 public boolean isIs() ; |
79 public boolean isIs() ; |
79 |
80 |
80 |
81 |
81 // commodity methods |
82 // commodity methods |
82 // |
83 // |
83 |
84 |
84 /** |
85 /** |
85 * Compares the specified <var>obj</var> parameter with this <code>OpenMBeanAttributeInfo</code> instance for equality. |
86 * Compares the specified <var>obj</var> parameter with this |
|
87 * {@code OpenMBeanAttributeInfo} instance for equality. |
86 * <p> |
88 * <p> |
87 * Returns <tt>true</tt> if and only if all of the following statements are true: |
89 * Returns {@code true} if and only if all of the following statements are true: |
88 * <ul> |
90 * <ul> |
89 * <li><var>obj</var> is non null,</li> |
91 * <li><var>obj</var> is non null,</li> |
90 * <li><var>obj</var> also implements the <code>OpenMBeanAttributeInfo</code> interface,</li> |
92 * <li><var>obj</var> also implements the {@code OpenMBeanAttributeInfo} interface,</li> |
91 * <li>their names are equal</li> |
93 * <li>their names are equal</li> |
92 * <li>their open types are equal</li> |
94 * <li>their open types are equal</li> |
93 * <li>their access properties (isReadable, isWritable and isIs) are equal</li> |
95 * <li>their access properties (isReadable, isWritable and isIs) are equal</li> |
94 * <li>their default, min, max and legal values are equal.</li> |
96 * <li>their default, min, max and legal values are equal.</li> |
95 * </ul> |
97 * </ul> |
96 * This ensures that this <tt>equals</tt> method works properly for <var>obj</var> parameters which are |
98 * This ensures that this {@code equals} method works properly for <var>obj</var> parameters which are |
97 * different implementations of the <code>OpenMBeanAttributeInfo</code> interface. |
99 * different implementations of the {@code OpenMBeanAttributeInfo} interface. |
98 * <br> |
100 * <br> |
99 * @param obj the object to be compared for equality with this <code>OpenMBeanAttributeInfo</code> instance; |
101 * @param obj the object to be compared for equality with this {@code OpenMBeanAttributeInfo} instance; |
100 * |
102 * |
101 * @return <code>true</code> if the specified object is equal to this <code>OpenMBeanAttributeInfo</code> instance. |
103 * @return {@code true} if the specified object is equal to this {@code OpenMBeanAttributeInfo} instance. |
102 */ |
104 */ |
103 public boolean equals(Object obj); |
105 public boolean equals(Object obj); |
104 |
106 |
105 /** |
107 /** |
106 * Returns the hash code value for this <code>OpenMBeanAttributeInfo</code> instance. |
108 * Returns the hash code value for this {@code OpenMBeanAttributeInfo} instance. |
107 * <p> |
109 * <p> |
108 * The hash code of an <code>OpenMBeanAttributeInfo</code> instance is the sum of the hash codes |
110 * The hash code of an {@code OpenMBeanAttributeInfo} instance is the sum of the hash codes |
109 * of all elements of information used in <code>equals</code> comparisons |
111 * of all elements of information used in {@code equals} comparisons |
110 * (ie: its name, its <i>open type</i>, and its default, min, max and legal values). |
112 * (ie: its name, its <i>open type</i>, and its default, min, max and legal values). |
111 * <p> |
113 * <p> |
112 * This ensures that <code> t1.equals(t2) </code> implies that <code> t1.hashCode()==t2.hashCode() </code> |
114 * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()} |
113 * for any two <code>OpenMBeanAttributeInfo</code> instances <code>t1</code> and <code>t2</code>, |
115 * for any two {@code OpenMBeanAttributeInfo} instances {@code t1} and {@code t2}, |
114 * as required by the general contract of the method |
116 * as required by the general contract of the method |
115 * {@link Object#hashCode() Object.hashCode()}. |
117 * {@link Object#hashCode() Object.hashCode()}. |
116 * |
118 * |
117 * @return the hash code value for this <code>OpenMBeanAttributeInfo</code> instance |
119 * @return the hash code value for this {@code OpenMBeanAttributeInfo} instance |
118 */ |
120 */ |
119 public int hashCode(); |
121 public int hashCode(); |
120 |
122 |
121 /** |
123 /** |
122 * Returns a string representation of this <code>OpenMBeanAttributeInfo</code> instance. |
124 * Returns a string representation of this {@code OpenMBeanAttributeInfo} instance. |
123 * <p> |
125 * <p> |
124 * The string representation consists of the name of this class (ie <code>javax.management.openmbean.OpenMBeanAttributeInfo</code>), |
126 * The string representation consists of the name of this class |
|
127 * (ie {@code javax.management.openmbean.OpenMBeanAttributeInfo}), |
125 * the string representation of the name and open type of the described attribute, |
128 * the string representation of the name and open type of the described attribute, |
126 * and the string representation of its default, min, max and legal values. |
129 * and the string representation of its default, min, max and legal values. |
127 * |
130 * |
128 * @return a string representation of this <code>OpenMBeanAttributeInfo</code> instance |
131 * @return a string representation of this {@code OpenMBeanAttributeInfo} instance |
129 */ |
132 */ |
130 public String toString(); |
133 public String toString(); |
131 |
134 |
132 |
135 |
133 // methods specific to open MBeans are inherited from |
136 // methods specific to open MBeans are inherited from |