api/jar/src/main/java/javax/slee/management/SbbNotification.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 SbbNotification) {
            // compare the service id then the sbb id
            SbbNotification that = (SbbNotification)obj;
            int serviceComparison = this.service.compareTo(that.service);
            return serviceComparison != 0 ? serviceComparison : this.sbb.compareTo(that.sbb);
        }
        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 SbbNotification) {
            // compare the service id then the sbb id
            SbbNotification that = (SbbNotification)obj;
            int serviceComparison = this.service.compareTo(that.service);
            return serviceComparison != 0 ? serviceComparison : this.sbb.compareTo(that.sbb);
        }
        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 SbbNotification ) { // compare the service id then the sbb id SbbNotification that = ( SbbNotification ) obj ; int serviceComparison = this . service . compareTo ( that . service ) ; return serviceComparison != 0 ? serviceComparison : this . sbb . compareTo ( that . sbb ) ; } 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 an <code>SbbNotification</code>, order is determined
by comparing first the encapsulated service component identifier and then,
if the service component identifiers are equal, the encapsulated SBB
component identifier.  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 an <code > SbbNotification< / code > order is determined by comparing first the encapsulated service component identifier and then if the service component identifiers are equal the encapsulated SBB component identifier . 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 > .