org.eclipse.ocl.examples.eventmanager.filters
Class ContainmentFilter

java.lang.Object
  extended by org.eclipse.ocl.examples.eventmanager.filters.AbstractEventFilter
      extended by org.eclipse.ocl.examples.eventmanager.filters.ContainmentFilter
All Implemented Interfaces:
EventFilter

public class ContainmentFilter
extends AbstractEventFilter

The Containment filter matches a notification if its Notification.getFeature() is an EReference and EReference.isContainment() is true, or if the Notification.getNotifier() is not an EObject, so it might be a ResourceSet or a Resource.

Author:
Philipp Berger, Axel Uhl

Constructor Summary
ContainmentFilter(boolean negated)
           
 
Method Summary
 ContainmentFilter clone()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getFilterCriterion()
          This method will only returns true, the logic is moved to the EventManagerTableBased
 int hashCode()
           
 boolean matchesFor(org.eclipse.emf.common.notify.Notification event)
          Tests if the incoming Notification matches the intern specification
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.eventmanager.filters.AbstractEventFilter
expandNewAndOldValueCollections, isNegated, setNegated
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainmentFilter

public ContainmentFilter(boolean negated)
Method Detail

matchesFor

public boolean matchesFor(org.eclipse.emf.common.notify.Notification event)
Description copied from interface: EventFilter
Tests if the incoming Notification matches the intern specification

Parameters:
event - the Notification to control
Returns:
whether the given Notification matches the intern specification

hashCode

public int hashCode()
Specified by:
hashCode in class AbstractEventFilter

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in class AbstractEventFilter

clone

public ContainmentFilter clone()
Specified by:
clone in interface EventFilter
Specified by:
clone in class AbstractEventFilter

getFilterCriterion

public java.lang.Object getFilterCriterion()
This method will only returns true, the logic is moved to the EventManagerTableBased

Specified by:
getFilterCriterion in interface EventFilter
Specified by:
getFilterCriterion in class AbstractEventFilter
See Also:
AbstractEventFilter.getFilterCriterion()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object