code: final boolean registerListener( NodeTypes.Listener listener ) {
          return listener != null ? this.listeners.addIfAbsent(listener) : false;
      }
docs: Add a listener that will be notified when the NodeTypes changes. Listeners will be called in a single thread, and should do
  almost no work.
  
  @param listener the new listener
  @return true if the listener was registered, or false if {@code listener} is null or if it is already registered