api/jar/src/main/java/javax/slee/usage/UsageOutOfRangeFilter.java
public boolean isNotificationEnabled(Notification notification) {
        if (!(notification instanceof UsageNotification)) return false;

        UsageNotification usageNotification = (UsageNotification)notification;
        if (service != null) {
            // SLEE 1.0 comparison
            return service.equals(usageNotification.getService())
                && sbb.equals(usageNotification.getSbb())
                && paramName.equals(usageNotification.getUsageParameterName())
                && (usageNotification.getValue() < lowValue || usageNotification.getValue() > highValue);
        }
        else {
            // SLEE 1.1 comparison
            return notificationSource.equals(usageNotification.getNotificationSource())
                && paramName.equals(usageNotification.getUsageParameterName())
                && (usageNotification.getValue() < lowValue || usageNotification.getValue() > highValue);
        }
    }
public boolean isNotificationEnabled(Notification notification) {
        if (!(notification instanceof UsageNotification)) return false;

        UsageNotification usageNotification = (UsageNotification)notification;
        if (service != null) {
            // SLEE 1.0 comparison
            return service.equals(usageNotification.getService())
                && sbb.equals(usageNotification.getSbb())
                && paramName.equals(usageNotification.getUsageParameterName())
                && (usageNotification.getValue() < lowValue || usageNotification.getValue() > highValue);
        }
        else {
            // SLEE 1.1 comparison
            return notificationSource.equals(usageNotification.getNotificationSource())
                && paramName.equals(usageNotification.getUsageParameterName())
                && (usageNotification.getValue() < lowValue || usageNotification.getValue() > highValue);
        }
    }
public boolean isNotificationEnabled ( Notification notification ) { if ( ! ( notification instanceof UsageNotification ) ) return false ; UsageNotification usageNotification = ( UsageNotification ) notification ; if ( service != null ) { // SLEE 1.0 comparison return service . equals ( usageNotification . getService ( ) ) && sbb . equals ( usageNotification . getSbb ( ) ) && paramName . equals ( usageNotification . getUsageParameterName ( ) ) && ( usageNotification . getValue ( ) < lowValue || usageNotification . getValue ( ) > highValue ) ; } else { // SLEE 1.1 comparison return notificationSource . equals ( usageNotification . getNotificationSource ( ) ) && paramName . equals ( usageNotification . getUsageParameterName ( ) ) && ( usageNotification . getValue ( ) < lowValue || usageNotification . getValue ( ) > highValue ) ; } }
Determine whether the specified notification should be delivered to notification
listeners using this notification filter.
@param notification the notification to be sent.
@return <code>true</code> if the notification should be delivered to notification
listeners, <code>false</code> otherwise.  This method always returns
<code>false</code> if <code>notification</code> is not an instance of
{@link UsageNotification}.
Determine whether the specified notification should be delivered to notification listeners using this notification filter .