code: public synchronized void setPolicy(Policy v)
     {
        if (policy != null && policy instanceof NotificationListener)
        {
           listeners.remove((NotificationListener)policy);
        }
  
        policy = v;
  
        if (policy != null && policy instanceof NotificationListener)
        {
           listeners.add((NotificationListener)policy);
        }
     }
docs: {@inheritDoc}