Like most questions of this nature, I unfortunately must say "it depends". When you do it this way, you're actually creating a new anonymous class, so there is an ever-so-slight performance hit in terms of memory and CPU, but under most circumstances I would say that it is insignificant enough to ignore. If doing it this way makes your code more readable, and if it is the style the rest of your team is using, I would say to go with it.