diff options
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/event/Events.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/event/Events.java b/src/main/java/fr/umlv/java/wallj/event/Events.java index da8b199..b7166b0 100644 --- a/src/main/java/fr/umlv/java/wallj/event/Events.java +++ b/src/main/java/fr/umlv/java/wallj/event/Events.java | |||
@@ -18,7 +18,7 @@ public final class Events { | |||
18 | */ | 18 | */ |
19 | public static <T extends Event> Stream<T> filter(List<Event> eventList, Class<T> eventClass) { | 19 | public static <T extends Event> Stream<T> filter(List<Event> eventList, Class<T> eventClass) { |
20 | return eventList.stream() | 20 | return eventList.stream() |
21 | .filter(e -> e.getClass().isInstance(eventClass)) | 21 | .filter(e -> e.getClass().isAssignableFrom(eventClass)) |
22 | .map(eventClass::cast); | 22 | .map(eventClass::cast); |
23 | } | 23 | } |
24 | 24 | ||