code: public void consumeEvents(Listener listener)
      {
          while (!isEmpty()) {
              Event event = remove();
              event.eventType.fireEvent(listener, event.eventParameters);
          }
      }
docs: Send all stored events to provided {@link Listener}.
  
  @param listener the {@link Listener} on which to send events