code: public void addListener(final L listener, final boolean allowDuplicate) {
          Validate.notNull(listener, "Listener object cannot be null.");
          if (allowDuplicate) {
              listeners.add(listener);
          } else if (!listeners.contains(listener)) {
              listeners.add(listener);
          }
      }
docs: Registers an event listener.  Will not add a pre-existing listener
  object to the list if <code>allowDuplicate</code> is false.
  
  @param listener the event listener (may not be <code>null</code>).
  @param allowDuplicate the flag for determining if duplicate listener
  objects are allowed to be registered.
  
  @throws NullPointerException if <code>listener</code> is <code>null</code>.
  @since 3.5