jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java
changeset 21656 d4c777ccb1db
parent 14342 8435a30053c1
child 23010 6dadb192ad81
equal deleted inserted replaced
21655:55f32ae4f920 21656:d4c777ccb1db
   797     /**
   797     /**
   798      * Compares this descriptor to the given object.  The objects are equal if
   798      * Compares this descriptor to the given object.  The objects are equal if
   799      * the given object is also a Descriptor, and if the two Descriptors have
   799      * the given object is also a Descriptor, and if the two Descriptors have
   800      * the same field names (possibly differing in case) and the same
   800      * the same field names (possibly differing in case) and the same
   801      * associated values.  The respective values for a field in the two
   801      * associated values.  The respective values for a field in the two
   802      * Descriptors are equal if the following conditions hold:</p>
   802      * Descriptors are equal if the following conditions hold:
   803      *
   803      *
   804      * <ul>
   804      * <ul>
   805      * <li>If one value is null then the other must be too.</li>
   805      * <li>If one value is null then the other must be too.</li>
   806      * <li>If one value is a primitive array then the other must be a primitive
   806      * <li>If one value is a primitive array then the other must be a primitive
   807      * array of the same type with the same elements.</li>
   807      * array of the same type with the same elements.</li>
   869      * This implementation does not support  interoperating with a directory
   869      * This implementation does not support  interoperating with a directory
   870      * or lookup service. Thus, conforming to the specification, no checking is
   870      * or lookup service. Thus, conforming to the specification, no checking is
   871      * done on the <i>"export"</i> field.
   871      * done on the <i>"export"</i> field.
   872      * <P>
   872      * <P>
   873      * Otherwise this implementation returns false if:
   873      * Otherwise this implementation returns false if:
   874      * <P>
       
   875      * <UL>
   874      * <UL>
   876      * <LI> name and descriptorType fieldNames are not defined, or
   875      * <LI> name and descriptorType fieldNames are not defined, or
   877      * null, or empty, or not String
   876      * null, or empty, or not String
   878      * <LI> class, role, getMethod, setMethod fieldNames, if defined,
   877      * <LI> class, role, getMethod, setMethod fieldNames, if defined,
   879      * are null or not String
   878      * are null or not String
   880      * <LI> persistPeriod, currencyTimeLimit, lastUpdatedTimeStamp,
   879      * <LI> persistPeriod, currencyTimeLimit, lastUpdatedTimeStamp,
   881      * lastReturnedTimeStamp if defined, are null, or not a Numeric
   880      * lastReturnedTimeStamp if defined, are null, or not a Numeric
   882      * String or not a Numeric Value >= -1
   881      * String or not a Numeric Value {@literal >= -1}
   883      * <LI> log fieldName, if defined, is null, or not a Boolean or
   882      * <LI> log fieldName, if defined, is null, or not a Boolean or
   884      * not a String with value "t", "f", "true", "false". These String
   883      * not a String with value "t", "f", "true", "false". These String
   885      * values must not be case sensitive.
   884      * values must not be case sensitive.
   886      * <LI> visibility fieldName, if defined, is null, or not a
   885      * <LI> visibility fieldName, if defined, is null, or not a
   887      * Numeric String or a not Numeric Value >= 1 and &lt;= 4
   886      * Numeric String or a not Numeric Value {@literal >= 1 and <= 4}
   888      * <LI> severity fieldName, if defined, is null, or not a Numeric
   887      * <LI> severity fieldName, if defined, is null, or not a Numeric
   889      * String or not a Numeric Value >= 0 and &lt;= 6<br>
   888      * String or not a Numeric Value {@literal >= 0 and <= 6}<br>
   890      * <LI> persistPolicy fieldName, if defined, is null, or not one of
   889      * <LI> persistPolicy fieldName, if defined, is null, or not one of
   891      * the following strings:<br>
   890      * the following strings:<br>
   892      *   "OnUpdate", "OnTimer", "NoMoreOftenThan", "OnUnregister", "Always",
   891      *   "OnUpdate", "OnTimer", "NoMoreOftenThan", "OnUnregister", "Always",
   893      *   "Never". These String values must not be case sensitive.<br>
   892      *   "Never". These String values must not be case sensitive.<br>
   894      * </UL>
   893      * </UL>
  1268             throw new XMLParseException(e, msg);
  1267             throw new XMLParseException(e, msg);
  1269         }
  1268         }
  1270     }
  1269     }
  1271 
  1270 
  1272     /**
  1271     /**
  1273      * Returns <pv>a human readable string representing the
  1272      * Returns a human readable string representing the
  1274      * descriptor</pv>.  The string will be in the format of
  1273      * descriptor.  The string will be in the format of
  1275      * "fieldName=fieldValue,fieldName2=fieldValue2,..."<br>
  1274      * "fieldName=fieldValue,fieldName2=fieldValue2,..."<br>
  1276      *
  1275      *
  1277      * If there are no fields in the descriptor, then an empty String
  1276      * If there are no fields in the descriptor, then an empty String
  1278      * is returned.<br>
  1277      * is returned.<br>
  1279      *
  1278      *