final Class<? extends Event> event) {
for (final Registration registration : registrationsByEvent.values()) {
final Class<? extends Event> existingEvent = registration.getEvent();
if (existingEvent.equals(event)) {
throw new DuplicateRegistrationException(listener, event,
registration.getListener(), existingEvent);
}
}
}