code: public void     forEach(final Function<T, Void> function)
      {
          for ( final ListenerEntry<T> entry : listeners.values() )
          {
              entry.executor.execute
              (
                  new Runnable()
                  {
                      @Override
                      public void run()
                      {
                          try
                          {
                              function.apply(entry.listener);
                          }
                          catch ( Throwable e )
                          {
                              log.error(String.format("Listener (%s) threw an exception", entry.listener), e);
                          }
                      }
                  }
              );
          }
      }
docs: Utility - apply the given function to each listener. The function receives
  the listener as an argument.
  
  @param function function to call for each listener