Notify the new value changes to the listeners added via {@link #addListener(Consumer)}.
179795
protected final void notifyListeners(T latestValue) {
        for (Consumer<? super T> listener : updateListeners) {
            listener.accept(latestValue);
        }
    }
29945
public void addListener(UpdateCheckListener newListener) {
        if (newListener == null) {
            throw new IllegalArgumentException("newListener");
        }
        GatewayVersion latestGatewayVersion = getLatestGatewayVersion();
        if (latestGatewayVersion != null && latestGatewayVersion.compareTo(currentVersion) > 0) {
            newListener.newVersionAvailable(currentVersion, latestGatewayVersion);
        }
        listeners.add(newListener);
    }
329031
void notifyListener() {
        Node<K, V> node;
        while ((node = pendingNotifications.poll()) != null) {
            listener.onEviction(node.key, node.getValue());
        }
    }
580073
@NonNull
    @Override
    public ListenerToken addChangeListener(@NonNull QueryChangeListener listener) {
        if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }
        return addChangeListener(null, listener);
    }
1048102
public void addListeners()
    {
        super.addListeners();
        
        this.addListener(new DateChangedHandler((DateTimeField)this.getField(Person.DATE_CHANGED)));
        this.addListener(new SetUserIDHandler(Person.CHANGED_ID, false));
        
        this.getField(Person.NAME).addListener(new CopyLastHandler(this.getField(Person.NAME_SORT)));    // Only if dest is null (ie., company name is null)
        this.getField(Person.NAME_SORT).addListener(new FieldToUpperHandler(null));
        
        this.getField(Person.POSTAL_CODE).addListener(new CopyFieldHandler(this.getField(Person.POSTAL_CODE_SORT)));
    }
187649
public void addListener(BaseListener listener)
    {
        listener.setNextListener(null);  // Just being safe
        if (this.getTable() != null)
            this.getTable().addListener(this, (FileListener)listener);   // Give the table a chance to clone this or whatever.
        else
            this.doAddListener((FileListener)listener);
    }
467222
public void addlistener(final ChangeListener listener) {
        synchronized (LISTENER_LOCK) {
            if (listeners.contains(listener)) {
                LOGGER.warn("Skip listener registration. listener[" + listener + "] is already registered!");
                return;
            }
            listeners.add(listener);
        }
    }
368801
void notifyListenersOnStateChange() {
        LOGGER.debug("Notifying connection listeners about state change to {}", state);
        
        for (ConnectionListener listener : connectionListeners) {
            switch (state) {
                case CONNECTED:
                    listener.onConnectionEstablished(connection);
                    break;
                case CONNECTING:
                    listener.onConnectionLost(connection);
                    break;
                case CLOSED:
                    listener.onConnectionClosed(connection);
                    break;
                default:
                    break;
            }
        }
    }
887384
protected void doNotifyListenersOfAddedValues(Map<K, R> newValues) {
        List<MapValueChangeListener<K, R>> listenersCopy = new ArrayList<MapValueChangeListener<K, R>>(listeners);
        Map<K, R> unmodifiable = Collections.unmodifiableMap(newValues);
        for (MapValueChangeListener<K, R> listener : listenersCopy) {
            listener.valuesAdded(this, unmodifiable);
        }
    }
52339
private void notifyChangeListeners(final Replication.ChangeEvent changeEvent) {
        if (changeListenerNotifyStyle == ChangeListenerNotifyStyle.SYNC) {
            for (ChangeListener changeListener : changeListeners) {
                try {
                    changeListener.changed(changeEvent);
                } catch (Exception e) {
                    Log.e(Log.TAG_SYNC, "Unknown Error in changeListener.changed(changeEvent)", e);
                }
            }
        } else {
            // ASYNC
            synchronized (executor) {
                if (!executor.isShutdown()) {
                    executor.submit(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                for (ChangeListener changeListener : changeListeners)
                                    changeListener.changed(changeEvent);
                            } catch (Exception e) {
                                Log.e(Log.TAG_SYNC, "Exception notifying replication listener: %s", e, this);
                                throw new RuntimeException(e);
                            }
                        }
                    });
                }
            }
        }
    }
1346315
public void addListener(LifecycleListener listener)
  {
    synchronized (this) {
      if (isDestroyed()) {
        IllegalStateException e = new IllegalStateException("attempted to add listener to a destroyed lifecyle " + this);

        if (_log != null)
          _log.log(Level.WARNING, e.toString(), e);
        else
          Logger.getLogger(Lifecycle.class.getName()).log(Level.WARNING, e.toString(), e);

        return;
      }

      if (_listeners == null)
        _listeners = new ArrayList<WeakReference<LifecycleListener>>();

      for (int i = _listeners.size() - 1; i >= 0; i--) {
        LifecycleListener oldListener = _listeners.get(i).get();

        if (listener == oldListener)
          return;
        else if (oldListener == null)
          _listeners.remove(i);
      }

      _listeners.add(new WeakReference<LifecycleListener>(listener));
    }
  }
914054
@Override
  public void addListener(final AgentModel.Listener listener) {
    listeners.add(listener);
    listener.tasksChanged(this);
  }
992638
protected <T> void listenObject(ObjectProperty<T> objectProperty, Consumer<T> consumeOld, Consumer<T> consumeNew) {
        objectProperty.addListener(
                                   (final ObservableValue<? extends T> ov, final T old_val, final T new_val) -> {
                                       if (old_val != null && consumeOld != null) {
                                           consumeOld.accept(old_val);
                                       }
                                       if (new_val != null && consumeNew != null) {
                                           consumeNew.accept(new_val);
                                       }
                                   });
    }
1348940
private void notifyListenersIfUninhibited(R oldValue, R newValue) {
        if (inhibited) {
            inhibitCount++;
            lastInhibitedValue = newValue;
        } else {
            lastInhibitedValue = newValue; // Just in case, even though not really necessary
            lastNonInhibitedValue = newValue;
            doNotifyListeners(oldValue, newValue);
        }
    }
1223595
@SafeVarargs
    public final void addCalendarListeners(ListChangeListener<Calendar>... listeners) {
        if (listeners != null) {
            for (ListChangeListener<Calendar> listener : listeners) {
                getCalendars().addListener(listener);
            }
        }
    }
1180046
ListenerToken addChangeListener(Executor executor, QueryChangeListener listener) {
        synchronized (lock) {
            if (!observing) { start(); }
            return changeNotifier.addChangeListener(executor, listener);
        }
    }
731445
@Override
  public void addListener(INetworkConnectionListener listener) {
    if (!this.listeners.contains(listener)) {
      this.listeners.add(listener);
    }
  }