org.jutil.event
Interface  ApplicabilityNotifier
- All Superinterfaces: 
- ListenerValidity, Notifier
- All Known Implementing Classes: 
- TypeApplicabilityNotifier
- public interface ApplicabilityNotifier- extends Notifier
Instances of this type add the posibility for users to ask
   whether the instance is applicable to a given listener/event
   combination.
 The ChainNotifier chains instances of this type. It uses
   isApplicable(EventListener, EventObject) to decide whether
   or not to use a particular applicability notifier to notify a
   particular listener with a particular event.
 The actual preconditions of the method
   Notifier.notifyEventListener(EventListener, EventObject) may be
   stronger than this method. isApplicable(EventListener,
   EventObject) should only test just enough to determine
   whether or not the intance can deal with this listener/event
   combination in the context of the listener/event combinations that
   actually will be offered to it. E.g., if we know for sure that
   the event argument will never be null, this method does not have to
   return false if it is called with an actual null argument,
   although the model method does. More specifically, there does not have to be code to check this. The
   specification is written this way in the interest of performance.
 Typically, the method checks the type of the listener.
   {@link TypeApplicabilityNotifier is a subclass that offers support
   for this.
 
 ...
 /oo
   o also
   o   public behavior
   o     pre listener != null;
   o     post \result == listener instanceof EventNameListener;
   oo/
 public boolean isApplicable(EventListener listener, EventObject event) {
   return (listener instanceof EventNameListener);
 }
 
 
| Method Summary | 
| abstract  boolean | isApplicable(java.util.EventListener listener,
             java.util.EventObject event)If a listener or event is valid, then this must return true.
 | 
 
 
 
CVS_REVISION
public static final java.lang.String CVS_REVISION
isApplicable
public abstract boolean isApplicable(java.util.EventListener listener,
                                     java.util.EventObject event)
- If a listener or event is valid, then this must return true.
   The implication in the formal specification means that the
   model methods can be stronger than the implementation of this
   method. This method only needs to test things which cannot be
   proven. 
- 
- Specifications:
- 
 public behavior
 requires listener != null;
 ensures \result  <== isValidListener(listener)&&isValidEvent(event);