diff options
author | pacien | 2018-02-03 18:12:42 +0100 |
---|---|---|
committer | pacien | 2018-02-03 18:12:42 +0100 |
commit | f759797ec3668ba8ba090e85c40ed26ea7ddbb1c (patch) | |
tree | 28ba2d7c93c33e87d71fd5d28b9f06cc870edfbb | |
parent | d03ad6430bdc0b3552149435ba20fb2bca4f294e (diff) | |
download | wallj-f759797ec3668ba8ba090e85c40ed26ea7ddbb1c.tar.gz |
Fix event class filtering
Signed-off-by: pacien <pacien.trangirard@pacien.net>
-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 | ||