code: public static Predicate<Event<?, ?>> withListenerClass(
              Class<? extends Listener> cls) {
          if (cls == null) {
              throw new IllegalArgumentException("cls is null");
          }
          return event -> event.getListenerClass() == cls;
      }
docs: Creates a predicate that matches events for the given listener class.
  
  @param cls The listener class to check for.
  @return The predicate.