api/jar/src/main/java/javax/slee/management/ResourceAdaptorEntityNotification.java
public int compareTo(Object obj) {
        // can't compare with null
        if (obj == null) throw new NullPointerException("obj is null");
        if (obj == this) return 0;

        if (obj instanceof ResourceAdaptorEntityNotification) {
            // compare the entity name
            ResourceAdaptorEntityNotification that = (ResourceAdaptorEntityNotification)obj;
            return this.entityName.compareTo(that.entityName);
        }
        else {
            return super.compareTo(TYPE, obj);
        }
    }
public int compareTo(Object obj) {
        // can't compare with null
        if (obj == null) throw new NullPointerException("obj is null");
        if (obj == this) return 0;

        if (obj instanceof ResourceAdaptorEntityNotification) {
            // compare the entity name
            ResourceAdaptorEntityNotification that = (ResourceAdaptorEntityNotification)obj;
            return this.entityName.compareTo(that.entityName);
        }
        else {
            return super.compareTo(TYPE, obj);
        }
    }
public int compareTo ( Object obj ) { // can't compare with null if ( obj == null ) throw new NullPointerException ( "obj is null" ) ; if ( obj == this ) return 0 ; if ( obj instanceof ResourceAdaptorEntityNotification ) { // compare the entity name ResourceAdaptorEntityNotification that = ( ResourceAdaptorEntityNotification ) obj ; return this . entityName . compareTo ( that . entityName ) ; } else { return super . compareTo ( TYPE , obj ) ; } }
Compare this notification source with the specified object for order.
Returns a negative integer, zero, or a positive integer if this object
is less than, equal to, or greater than the specified object.
<p>
If <code>obj</code> is a <code>ResourceAdaptorEntityNotification</code>,
order is determined by comparing the encapsulated resource adaptor entity
name.  Otherwise, if <code>obj</code> is a <code>NotificationSource</code>,
ordering is determined by comparing the class name of this class with the
class name of <code>obj</code>.
@param obj the object to compare this with.
@return a negative integer, zero, or a positive integer if this notification
source is considered less than, equal to, or greater than the
specified object.
@throws ClassCastException if <code>obj</code> does not implement the
{@link NotificationSource} interface.
@see Comparable#compareTo(Object)
Compare this notification source with the specified object for order . Returns a negative integer zero or a positive integer if this object is less than equal to or greater than the specified object . <p > If <code > obj< / code > is a <code > ResourceAdaptorEntityNotification< / code > order is determined by comparing the encapsulated resource adaptor entity name . Otherwise if <code > obj< / code > is a <code > NotificationSource< / code > ordering is determined by comparing the class name of this class with the class name of <code > obj< / code > .