add {@link NotificationBoard#StateListener}.

@param l
777076
public void addStateListener(StateListener l) {
        if (mListeners == null) {
            mListeners = new ArrayList<StateListener>();
        }
        if (!mListeners.contains(l)) {
            mListeners.add(l);
        }
    }
291912
private void registerScrollLayoutListener() {
        if (scrollView != null) {
            scrollView.getViewTreeObserver()
                    .addOnGlobalLayoutListener(createScrollViewLayoutListener(scrollView));
        } else if (listView != null) {
            listView.getViewTreeObserver()
                    .addOnGlobalLayoutListener(createScrollViewLayoutListener(listView));
        }
    }
630154
protected void notifyListeners()
   {
      synchronized (listeners)
      {
         Thread notifier = new NotifyThread(listeners.toArray(new BackupJobListener[listeners.size()]), this);
         notifier.start();
      }
   }
1209612
public void awaitState(State state, Consumer<State> listener) {
    if (this.state == state) {
      listener.accept(this.state);
    } else {
      addStateChangeListener(new Consumer<State>() {
        @Override
        public void accept(State state) {
          listener.accept(state);
          removeStateChangeListener(this);
        }
      });
    }
  }
697883
public void addPhaseListener(PhaseListener phaseListener)
    {
        if (phaseListener == null)
        {
            throw new NullPointerException("phaseListener");
        }
        
        getStateHelper().add(PropertyKeys.phaseListeners, phaseListener);
    }
980444
function addStateListeners() {
  this.state.on('connect', this.onConnect);
  this.state.on('disconnect', this.onDisconnect);
  this.state.on('rejected', this.onRejected);
  this.state.store.on('hit', this.onHit);
  this.state.store.on('miss', this.onMiss);
  this.state.store.on('expired', this.onExpired);
}
372407
public void addMediaListener(JingleMediaListener li) {
        for (ContentNegotiator contentNegotiator : contentNegotiators) {
            if (contentNegotiator.getMediaNegotiator() != null) {
                contentNegotiator.getMediaNegotiator().addListener(li);
            }
        }

    }
754600
public void addListener( IDmListener listener ) {

		if( listener == null ) {
			this.logger.info( "An invalid DM listener failed to be added." );

		} else {
			synchronized( this.dmListeners ) {
				this.dmListeners.add( listener );
			}

			if( this.enableNotifications.get())
				listener.enableNotifications();

			this.logger.info( "The listener '" + listener.getId() + "' is now available in Roboconf's DM." );
		}

		listListeners();
	}
1017195
@NonNull
    public Transition addListener(@NonNull TransitionListener listener) {
        if (mListeners == null) {
            mListeners = new ArrayList<TransitionListener>();
        }
        mListeners.add(listener);
        return this;
    }
731280
public final void addLifecycleListener(@NonNull LifecycleListener lifecycleListener) {
        if (!lifecycleListeners.contains(lifecycleListener)) {
            lifecycleListeners.add(lifecycleListener);
        }
    }
809662
public synchronized void addStateListener(@Nonnull EndpointStateListener<VALUE_TYPE, ARG_TYPE> listener) throws IllegalArgumentException {
        checkListenerNonNull(listener);
        fieldStateListeners.add(listener);
        if (informStateListenerOnAdd) {
            informStateListener(getStateAndValue(), listener);
        }
    }
1072100
public void addConnectionListener(KNXListener l)
	{
		if (l == null)
			return;
		synchronized (listeners) {
			if (!listeners.contains(l)) {
				listeners.add(l);
				listenersCopy = new ArrayList(listeners);
			}
			else
				logger.warn("event listener already registered");
		}
	}
1261230
private void initListeners() {
        listViewProperty().addListener((listObj, oldList, newList) -> {
            if (newList != null) {
                if (getListView() instanceof JFXListView) {
                    ((JFXListView<?>) newList).currentVerticalGapProperty().addListener((o, oldVal, newVal) -> {
                        cellRippler.rippler.setClip(null);
                        if (newVal.doubleValue() != 0) {
                            playExpandAnimation = true;
                            getListView().requestLayout();
                        } else {
                            // fake expand state
                            double gap = clip.getY() * 2;
                            gapAnimation = new Timeline(
                                new KeyFrame(Duration.millis(240),
                                    new KeyValue(this.translateYProperty(),
                                        -gap / 2 - (gap * (getIndex())),
                                        Interpolator.EASE_BOTH)
                                ));
                            gapAnimation.play();
                            gapAnimation.setOnFinished((finish) -> {
                                requestLayout();
                                Platform.runLater(() -> getListView().requestLayout());
                            });
                        }
                    });

                    selectedProperty().addListener((o, oldVal, newVal) -> {
                        if (newVal) {
                            selectionChanged = true;
                        }
                    });
                }
1239156
protected void notifyChangeListeners() {
        ChangeEvent e = new ChangeEvent(this);
        for (ChangeListener l : changeListeners) {
            l.stateChanged(e);
        }
    }
774092
@Override
    public synchronized void onOpen() {
        super.onOpen();

        if (phoneStateListener == null) {
            Handler mainHandler = new Handler(context.getMainLooper());
            mainHandler.post(new Runnable() {
                @Override
                public void run() {
                    phoneStateListener = new PhoneStateListener() {

                        @Override
                        public void onCellInfoChanged(List<CellInfo> cellInfo) {
                            if (cellInfo != null && !cellInfo.isEmpty()) {
                                onCellsChanged(cellInfo);
                            } else if (supportsCellInfoChanged) {
                                supportsCellInfoChanged = false;
                                onSignalStrengthsChanged(null);
                            }
                        }

                        @Override
                        public void onSignalStrengthsChanged(SignalStrength signalStrength) {
                            if (!supportsCellInfoChanged) {
                                fallbackScan();
                            }
                        }
                    };
                    registerPhoneStateListener();
                }
            });
        } else {
            registerPhoneStateListener();
        }
    }
1344866
@Override
    public void step(SimState arg0) {
        logger.finest("Notifying each element of the notifable element list...");
        for(Notifable n: NotificationManager.notifables){
            NotificationManager.addNotification(n);
        }
    }
994839
private void addEPStatementListener(UpdateListener listener) {
		if (this.subscriber == null) {
			if (epStatement != null) {
				epStatement.addListener(listener);
			}
		}
	}