From b4e57931bc8642c389184c3eb7ecc0ca9bd8103a Mon Sep 17 00:00:00 2001 From: Svetlin12 Date: Sat, 9 Nov 2024 15:03:51 +0200 Subject: [PATCH] Add new method in Generics Lab --- 05-generics/lab/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/05-generics/lab/README.md b/05-generics/lab/README.md index 0aa1735f..8ae0d79a 100644 --- a/05-generics/lab/README.md +++ b/05-generics/lab/README.md @@ -201,7 +201,16 @@ public interface EventBus { */ Collection> getEventLogs(Class> eventType, Instant from, Instant to); - + + /** + * Returns all subscribers for the given event type in an unmodifiable collection. If there are + * no subscribers for the event type, the method returns an empty unmodifiable collection. + * + * @param eventType the type of event to get subscribers for + * @return an unmodifiable collection of subscribers for the given event type + * @throws IllegalArgumentException if the event type is null + */ + > Collection> getSubscribersForEvent(Class eventType); } ```