Just a fabulous piece of Java code

Now and then when coding you come up with something just awesome.

Although Java is not exactly my strong point, I’ve become more and more familiar with it to the point I can now write classes with multiple sub-classes with inheritance, etc. The best thing about this now, is I can imagine the whole thing and create just the one class to cover everything. Just like I do in C++.

Here’s a snippet: