14
Example solution: mediators
•Each set allows insertion and deletion of elements
•Each set also announces an “inserted” event and a “removed” event when the associated operation is performed
•A separate component, a mediator M, registers interest in the events from both sets
•Ex: If an element is inserted into S1, then M receives an “inserted” event; it then can invoke the insert method on S2