Set MARC listener for a specific record type.
@param type the record type
@param listener the MARC listener
@return this handler
322290
public MarcContentHandler setMarcListener(String type, MarcListener listener) {
        this.listeners.put(type, listener);
        return this;
    }
376913
function(element, type, handler) {
      var types = type.split(' ');
      for(var t=0; t<types.length; t++) {
        element.addEventListener(types[t], handler, false);
      }
    }
473098
public TreeBuilder<T> listen(Listener<T> listener) {
        return listen(listener, PathUtil.allpathSelector());
    }
1127588
public void setMediumTickMarkType(final TickMarkType TYPE) {
        if (null == mediumTickMarkType) {
            _mediumTickMarkType = null == TYPE ? TickMarkType.LINE : TYPE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            mediumTickMarkType.set(TYPE);
        }
    }
7450
@Synchronized
    public <T extends Notification> void removeListener(final String type, final Listener<T> listener) {
        map.get(type).removeIf(e -> e.getListener().equals(listener));
    }
1000533
protected static void requestNotificationOnChange(JvmType type, Runnable listener) {
		Resource resource = type.eResource();
		if (resource instanceof TypeResource) {
			IMirror mirror = ((TypeResource) resource).getMirror();
			if (mirror instanceof IMirrorExtension) {
				if (((IMirrorExtension) mirror).isSealed())
					return;
			}
		}
		Notifier notifier = type;
		if (resource != null) {
			if (resource.getResourceSet() != null)
				notifier = resource.getResourceSet();
			else
				notifier = resource;
		}
		JvmTypeChangeDispatcher dispatcher = JvmTypeChangeDispatcher.findResourceChangeDispatcher(notifier);
		dispatcher.requestNotificationOnChange(type, listener);
	}
941647
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setType(final String type) {
        pathBuilder.setType(type);
        return (T) this;
    }
1083898
public LowLevelResultListener<R> registerLowLevelResultListener(LowLevelResultListener<R> listener) {
        LowLevelResultListener<R> prev = this.listener;
        if (listener == null)
            this.listener = LowLevelResultListener.none();
        else
            this.listener = listener;
        return prev;
    }
836987
@Nullable
    public <P> P getListener(Class<P> type) {
        if (mListener != null) {
            return type.cast(mListener);
        }
        return null;
    }
1295652
public void registerRecordAvailabilityListener(final RecordAvailabilityListener<T> listener) {
		if (!this.recordAvailabilityListener.compareAndSet(null, listener)) {
			throw new IllegalStateException(this.recordAvailabilityListener
				+ " is already registered as a record availability listener");
		}
	}
161709
function(type, handler) {
      if (!this.listeners_)
        return;
      if (type in this.listeners_) {
        var handlers = this.listeners_[type];
        var index = handlers.indexOf(handler);
        if (index >= 0) {
          // Clean up if this was the last listener.
          if (handlers.length == 1)
            delete this.listeners_[type];
          else
            handlers.splice(index, 1);
        }
      }
    }
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);
        }
    }
130771
protected final <T extends EventListener> void addListener(Class<T> listenerType, T listener) {
		if (this.listeners == null) {
			this.listeners = new ListenerCollection<>();
		}
		this.listeners.add(listenerType, listener);
	}
372524
public void addAStarListener(AStarListener<ST, PT> listener) {
		if (this.listeners == null) {
			this.listeners = new ArrayList<>();
		}
		this.listeners.add(listener);
	}
903890
public synchronized void addServletReferenceListener(ServletReferenceListener listener) {
        if (this.cacheWrappers == null) {
            cacheWrappers = new ArrayList();
        }
        this.cacheWrappers.add(listener);
    }
375905
public void addListener(ComObjectListener listener) {
        if(listener==null)
            throw new IllegalArgumentException("listener is null");
        if(listeners.contains(listener))
            throw new IllegalArgumentException("can't register the same listener twice");
        listeners.add(listener);
    }
960708
@NonNull
    public ListenerToken addDocumentReplicationListener(@NonNull DocumentReplicationListener listener) {
        if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }

        return addDocumentReplicationListener(null, listener);
    }