code: public void addListener(WindowListener<K,R,P> listener) {
          this.listeners.addIfAbsent(new UnwrappedWeakReference<WindowListener<K,R,P>>(listener));
      }
docs: Adds a new WindowListener if and only if it isn't already present.
  @param listener The listener to add