Leszek Gawron wrote:
A cosmetic change but:
1. gives better encapsulation and Event based classes do not look that stupid anymore (some of them were totally empty just to be matched by instanceof)


2. Invoker looks much cleaner

The only thing that might be against is that instead of if else if else if we have method invocations which might (or not?) be less efficient.

+1, it's more object oriented, if you see such instanceof cascades it always looks as something is horribly wrong with the code. BTW, I doubt that a method invocation is slower than an instanceof test.

Carsten

--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Reply via email to