docs: protected <T extends Listener> Collection<T> copyList(Class<T> listenerClass,
              Stream<Object> listeners, int sizeHint) {
          if (sizeHint == 0) {
              return Collections.emptyList();
          }
          return listeners
                  .map(listenerClass::cast)
                  .collect(Collectors.toCollection(() -> new ArrayList<>(sizeHint)));
      }