Runtime

## org.eclipse.gmf.runtime.diagram.core.listener
Class DiagramEventBroker.NotifierToKeyToListenersSetMap

    java.lang.Object
      org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.NotifierToKeyToListenersSetMap

Enclosing class:
  DiagramEventBroker

    public final class DiagramEventBroker.NotifierToKeyToListenersSetMap

extends java.lang.Object

Utility class representing a Map of Notifier to a Map of Keys to a Set of listener

Constructor Summary
`DiagramEventBroker.NotifierToKeyToListenersSetMap()`

Method Summary
`void` `addListener(org.eclipse.emf.ecore.EObject notifier, java.lang.Object listener)` Adds a listener to the notifier; this listener is added againest a generic key, `LISTEN_TO_ALL_FEATURES`so it can listen to all events on the notifier``
`void` `addListener(org.eclipse.emf.ecore.EObject notifier, java.lang.Object key, java.lang.Object listener)` Adds a listener to the map
`java.util.Set` `getAllListeners(java.lang.Object notifier)` return all listeners interested in the passed notifier
`java.util.Set` `getListeners(java.lang.Object notifier, java.lang.Object key)` get listeners interested in the passed notifier and key
`boolean` `isEmpty()`
`void` `removeListener(org.eclipse.emf.ecore.EObject notifier, java.lang.Object key, java.lang.Object listener)` removes a listener from the map

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DiagramEventBroker.NotifierToKeyToListenersSetMap

    public DiagramEventBroker.NotifierToKeyToListenersSetMap()

Method Detail

### addListener

    public void addListener(org.eclipse.emf.ecore.EObject notifier,
                            java.lang.Object key,
                            java.lang.Object listener)

  Adds a listener to the map

  Parameters:
    `notifier` - the notifier the listener will listen to
    `key` - a key for the listener, this help in categorizing the listeners based on their interest
    `listener` - the listener

### addListener

    public void addListener(org.eclipse.emf.ecore.EObject notifier,
                            java.lang.Object listener)

  Adds a listener to the notifier; this listener is added againest a generic key, `LISTEN_TO_ALL_FEATURES`so it can listen to all events on the notifier

  ``
  Parameters:
    `notifier` - the notifier the listener will listen to
    `listener` - the listener

### removeListener

    public void removeListener(org.eclipse.emf.ecore.EObject notifier,
                               java.lang.Object key,
                               java.lang.Object listener)

  removes a listener from the map

  Parameters:
    `notifier` -
    `key` -
    `listener` -

### getListeners

    public java.util.Set getListeners(java.lang.Object notifier,
                                      java.lang.Object key)

  get listeners interested in the passed notifier and key

  Parameters:
    `notifier` -
    `key` -
  Returns:
    `Set` of listeners

### getAllListeners

    public java.util.Set getAllListeners(java.lang.Object notifier)

  return all listeners interested in the passed notifier

  Parameters:
    `notifier` -
  Returns:

### isEmpty

    public boolean isEmpty()

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.