While I’m a little sceptical of your design, you might want to look at Class.isInstance(…) instead of instanceof.
1 Like
While I’m a little sceptical of your design, you might want to look at Class.isInstance(…) instead of instanceof.